/* ============================================================
   modal-standard.css — Single source of truth for modal styling
   ============================================================
   Usage:  Add the appropriate class to <div class="modal-content">
   alongside Bootstrap's default .modal-content class.

   Types:
     .modal-std          — base styling applied to ALL standard modals
     .modal-std-info     — informational / detail modals (branded header)
     .modal-std-help     — help / explanation modals (light branded header)
     .modal-std-danger   — destroy / delete confirmations (red accent)
     .modal-std-warning  — warnings, alarms (amber accent)
     .modal-std-form     — forms: add / edit / config (neutral grey header)
     .modal-std-aws      — AWS-branded modals (AWS dark header, orange accent)
     .modal-std-ops      — operation / log streaming modals (branded dark header)

   White-label integration:
     Colours adapt automatically via CSS custom properties set by
     the white_label_css() route:
       --wl-primary    (sidebar/navbar colour — used for modal headers)
       --wl-secondary  (link/accent colour — used for icon accents)
       --wl-accent     (hover/highlight colour)
       --wl-btn-text   (button text colour — used for header text)
   ============================================================ */

/* ── Base ─────────────────────────────────────────────────────── */

.modal-std .modal-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #dee2e6;
    cursor: move;
    user-select: none;
}

.modal-std .modal-header .modal-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-std .modal-body {
    padding: 20px;
}

.modal-std .modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #dee2e6;
}

.modal-std .modal-footer .btn {
    min-width: 80px;
}

/* Default close button (dark text on light header) */
.modal-std .close {
    color: #333;
    opacity: 0.6;
    text-shadow: none;
}
.modal-std .close:hover {
    opacity: 1;
}

/* ── Info (branded header, white text) ───────────────────────── */

.modal-std-info .modal-header {
    background: var(--wl-primary, #002245);
    color: var(--wl-btn-text, #fff);
    border-bottom: none;
}
.modal-std-info .modal-header .modal-title {
    color: var(--wl-btn-text, #fff);
}
.modal-std-info .modal-header .modal-title i {
    color: var(--wl-secondary, #5DADE2);
}
.modal-std-info .close {
    color: var(--wl-btn-text, #fff);
    opacity: 0.8;
}
.modal-std-info .close:hover {
    opacity: 1;
}

/* ── Help (light branded header) ─────────────────────────────── */

.modal-std-help .modal-header {
    background: var(--wl-primary, #002245);
    color: var(--wl-btn-text, #fff);
    border-bottom: none;
    opacity: 0.85;
}
.modal-std-help .modal-header .modal-title {
    color: var(--wl-btn-text, #fff);
    text-align: center;
    width: 100%;
}
.modal-std-help .modal-header .modal-title i {
    color: var(--wl-secondary, #5DADE2);
}
.modal-std-help .close {
    color: var(--wl-btn-text, #fff);
    opacity: 0.8;
}
.modal-std-help .close:hover {
    opacity: 1;
}
.modal-std-help .modal-footer {
    justify-content: center;
}

/* ── Danger (red top border) ─────────────────────────────────── */

.modal-std-danger {
    border-top: 3px solid #dc3545;
}
.modal-std-danger .modal-header .modal-title i {
    color: #dc3545;
}

/* ── Warning (amber top border + cream header) ───────────────── */

.modal-std-warning {
    border-top: 4px solid #f0a500;
}
.modal-std-warning .modal-header {
    background: #fff8e8;
    border-bottom: 1px solid #ffe8a0;
}
.modal-std-warning .modal-header .modal-title {
    color: #b37700;
}
.modal-std-warning .modal-header .modal-title i {
    color: #f0a500;
}
.modal-std-warning .modal-footer {
    justify-content: center;
}

/* ── Form (neutral grey header) ──────────────────────────────── */

.modal-std-form .modal-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

/* ── AWS (AWS dark header, orange accent) ─────────────────────── */

.modal-std-aws .modal-header {
    background: #232f3e;
    color: #fff;
    border-bottom: none;
}
.modal-std-aws .modal-header .modal-title {
    color: #fff;
}
.modal-std-aws .modal-header .modal-title i {
    color: #FF9900;
}
.modal-std-aws .close {
    color: #fff;
    opacity: 0.8;
}
.modal-std-aws .close:hover {
    opacity: 1;
}

/* ── Ops / log streaming (branded dark header, no body padding) ─ */

.modal-std-ops .modal-header {
    background: var(--wl-primary, #1e293b);
    color: var(--wl-btn-text, #fff);
    border-bottom: none;
    gap: 16px;
}
.modal-std-ops .modal-header .modal-title {
    color: var(--wl-btn-text, #fff);
    flex: 1;
}
.modal-std-ops .close {
    color: var(--wl-btn-text, #fff);
    opacity: 0.8;
}
.modal-std-ops .close:hover {
    opacity: 1;
}
.modal-std-ops .modal-body {
    padding: 0;
}
