/* A10_3R3_SIDEBAR_QR_ACTIONS_START */

/* Desktop: sidebar anclado al viewport y con scroll interno completo. */
@media (min-width: 1025px) {
    html,
    body {
        min-height: 100%;
    }

    .ad360-app-shell,
    html.ad360-desktop-shell .ad360-app-shell {
        display: grid !important;
        grid-template-columns: 280px minmax(0, 1fr) !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        width: 100% !important;
    }

    .ad360-sidebar,
    html.ad360-desktop-shell .ad360-sidebar {
        position: fixed !important;
        inset: 0 auto 0 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        z-index: 50 !important;
    }

    .ad360-main-column,
    html.ad360-desktop-shell .ad360-main-column {
        grid-column: 2 !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .ad360-sidebar-nav {
        flex: 0 0 auto !important;
    }

    .ad360-sidebar-shortcuts {
        flex: 0 0 auto !important;
        padding-bottom: 20px !important;
    }

    .ad360-sidebar::-webkit-scrollbar {
        width: 9px;
    }

    .ad360-sidebar::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, .04);
    }

    .ad360-sidebar::-webkit-scrollbar-thumb {
        border: 2px solid transparent;
        border-radius: 999px;
        background: rgba(203, 213, 225, .42);
        background-clip: padding-box;
    }
}

/* QR management */
.ad360-qr-created-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ad360-qr-create-card {
    scroll-margin-top: 20px;
    border-color: rgba(37, 99, 235, .28);
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .94), rgba(255, 255, 255, .98));
}

.ad360-qr-create-heading {
    margin-bottom: 16px;
}

.ad360-qr-section-title {
    font-size: 1.25rem !important;
}

.ad360-qr-create-form {
    display: grid;
    gap: 18px;
}

.ad360-qr-create-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ad360-qr-create-form .ad-form-field {
    display: grid;
    align-content: start;
    gap: 7px;
}

.ad360-qr-create-form .ad-form-field label {
    color: var(--ad-text, #0f172a);
    font-weight: 900;
}

.ad360-qr-create-form .ad-form-field input,
.ad360-qr-create-form .ad-form-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #0f172a;
    background: #ffffff;
}

.ad360-qr-create-form .ad-form-field input:focus,
.ad360-qr-create-form .ad-form-field select:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, .14);
}

.ad360-qr-create-form .ad-form-field small {
    color: #64748b;
    line-height: 1.35;
}

.ad360-qr-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid #dbe4ef;
}

.ad360-qr-security-note {
    max-width: 720px;
    color: #475569;
    line-height: 1.45;
}

.ad360-inline-form {
    display: inline-flex;
    margin: 0;
}

.ad360-qr-row-actions {
    justify-content: flex-start !important;
    align-items: center;
    gap: 7px !important;
    flex-wrap: wrap;
}

.ad360-qr-row-actions .ad-btn {
    white-space: nowrap;
}

@media (max-width: 1280px) and (min-width: 1025px) {
    .ad360-qr-create-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .ad360-qr-create-grid {
        grid-template-columns: 1fr !important;
    }

    .ad360-qr-form-footer,
    .ad360-qr-created-alert {
        align-items: stretch;
        flex-direction: column;
    }

    .ad360-qr-form-footer .ad-btn,
    .ad360-qr-created-alert .ad-btn {
        width: 100%;
        justify-content: center;
    }
}

/* A10_3R3_SIDEBAR_QR_ACTIONS_END */
/* PRE95-P3R1: digest integrado al shell principal */
.ad360-digest-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ad360-digest-actions form {
    margin-top: auto;
}

.ad360-digest-action {
    display: flex;
    flex-direction: column;
    min-height: 190px;
}

.ad360-digest-output {
    overflow-x: auto;
    padding: 14px;
    border-radius: 12px;
    color: #e2e8f0;
    background: #0f172a;
    white-space: pre-wrap;
}

@media (max-width: 1100px) {
    .ad360-digest-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .ad360-digest-actions {
        grid-template-columns: 1fr;
    }
}
