﻿/* ======================================================
   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;
    }

