﻿/* ======================================================
   GLOBAL MODAL SYSTEM (v3.0)
   Enterprise Unified Modal for CDS Dashboard
====================================================== */

.gm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45); /* deep slate semi-transparent */
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000!important;
    padding: 1.5rem;
    overflow-y: auto;
    transition: opacity 0.25s ease;
}

    .gm-overlay.show {
        display: flex;
        opacity: 1;
    }

.gm-content {
    background: var(--surface, #ffffff);
    color: var(--text, #0f172a);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    max-width: 640px;
    width: 100%;
    animation: gmPopIn 0.25s ease;
    overflow: hidden;
}

@keyframes gmPopIn {
    from {
        transform: scale(0.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ====== HEADER ====== */
.gm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.gm-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.gm-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

    .gm-close:hover {
        color: #111827;
    }

/* ====== BODY ====== */
.gm-body {
    padding: 1.25rem 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
}

/* ====== FOOTER ====== */
.gm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ====== BUTTONS ====== */
.gm-btn {
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .gm-btn:active {
        transform: scale(0.97);
    }

.gm-btn-primary {
    background: var(--accent, #2563eb);
    color: white;
}

    .gm-btn-primary:hover {
        background: #1d4ed8;
    }

.gm-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

    .gm-btn-secondary:hover {
        background: #e5e7eb;
    }

.gm-btn-danger {
    background: #dc2626;
    color: white;
}

    .gm-btn-danger:hover {
        background: #b91c1c;
    }



/* ======================================================
   HELP CONTENT (inside GlobalModal)
   Used by info-help.js injected markup:
   .help-modal, .help-modal-body, .help-modal-footer, etc.
====================================================== */

.gm-body .help-modal {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Typography + spacing */
.gm-body .help-modal-body {
    color: var(--text, #0f172a);
    line-height: 1.55;
    font-size: 0.98rem;
}

    .gm-body .help-modal-body p {
        margin: 0 0 10px 0;
        color: var(--text, #0f172a);
    }

        .gm-body .help-modal-body p:last-child {
            margin-bottom: 0;
        }

    .gm-body .help-modal-body b,
    .gm-body .help-modal-body strong {
        font-weight: 650;
    }

    .gm-body .help-modal-body em {
        color: var(--text-muted, #6b7280);
    }

    /* Lists (workflow steps) */
    .gm-body .help-modal-body ol,
    .gm-body .help-modal-body ul {
        margin: 10px 0 12px 18px;
        padding: 0;
    }

    .gm-body .help-modal-body li {
        margin: 6px 0;
        color: var(--text, #0f172a);
    }

    .gm-body .help-modal-body ol li::marker {
        font-weight: 650;
        color: var(--text, #0f172a);
    }

/* Subtle callout (optional: wrap tips in <div class="help-callout">...</div>) */
.gm-body .help-callout {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--text, #0f172a);
}

    .gm-body .help-callout .help-callout-title {
        font-weight: 650;
        margin-bottom: 6px;
    }

/* Footer row inside body (checkbox) */
.gm-body .help-modal-footer {
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Checkbox styling */
.gm-body .help-modal-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
    font-size: 0.95rem;
}

    .gm-body .help-modal-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        border-radius: 4px;
        accent-color: var(--accent, #2563eb);
    }

/* Nice links if you ever add them */
.gm-body .help-modal-body a {
    color: var(--accent, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

    .gm-body .help-modal-body a:hover {
        text-decoration: underline;
    }
