/**
 * LGConfirm — Cyberpunk Confirmation Modal
 * Uses only CSS custom properties from the design system.
 * No external dependencies.
 */

/* ============================================================
   OVERLAY / BACKDROP
   ============================================================ */

.lgc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99998; /* below toasts (99999), above everything else */
    padding: 16px;

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lgc-overlay.lgc-overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   MODAL CONTAINER
   ============================================================ */

.lgc-modal {
    width: 100%;
    max-width: 460px;
    background: rgba(13, 13, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);

    /* Cyberpunk angular corners (clip-path) */
    clip-path: polygon(
        0 0,
        calc(100% - 18px) 0,
        100% 18px,
        100% 100%,
        18px 100%,
        0 calc(100% - 18px)
    );

    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 245, 212, 0.08);

    transform: translateY(16px) scale(0.97);
    transition: transform 0.25s ease;
}

.lgc-overlay.lgc-overlay--visible .lgc-modal {
    transform: translateY(0) scale(1);
}

/* ============================================================
   HEADER
   ============================================================ */

.lgc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.lgc-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.lgc-icon svg {
    width: 20px;
    height: 20px;
}

.lgc-icon--danger {
    background: rgba(247, 37, 133, 0.12);
    border: 1px solid rgba(247, 37, 133, 0.3);
    color: var(--neon-magenta, #f72585);
    filter: drop-shadow(0 0 8px rgba(247, 37, 133, 0.3));
}

.lgc-icon--primary {
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.25);
    color: var(--neon-cyan, #00f5d4);
    filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.25));
}

.lgc-title {
    flex: 1;
    margin: 0;
    font-family: var(--font-display, 'Orbitron', monospace);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-transform: uppercase;
}

.lgc-close-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lgc-close-btn:hover {
    background: rgba(247, 37, 133, 0.12);
    border-color: rgba(247, 37, 133, 0.35);
    color: var(--neon-magenta, #f72585);
}

.lgc-close-btn:focus-visible {
    outline: 2px solid var(--neon-cyan, #00f5d4);
    outline-offset: 2px;
}

.lgc-close-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================================
   BODY
   ============================================================ */

.lgc-body {
    padding: 16px 20px;
}

.lgc-message {
    margin: 0;
    font-family: var(--font-body, 'Rajdhani', sans-serif);
    font-size: 0.95rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    line-height: 1.55;
}

/* ============================================================
   FOOTER
   ============================================================ */

.lgc-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 20px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.lgc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    font-family: var(--font-body, 'Rajdhani', sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;

    /* Cyberpunk angular corners */
    clip-path: polygon(
        0 0,
        calc(100% - 8px) 0,
        100% 8px,
        100% 100%,
        8px 100%,
        0 calc(100% - 8px)
    );
}

.lgc-btn:focus-visible {
    outline: 2px solid var(--neon-cyan, #00f5d4);
    outline-offset: 3px;
}

/* Cancel button */
.lgc-btn--cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

.lgc-btn--cancel:hover {
    background: rgba(0, 245, 212, 0.08);
    border-color: rgba(0, 245, 212, 0.3);
    color: var(--neon-cyan, #00f5d4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 245, 212, 0.12);
}

.lgc-btn--cancel:active {
    transform: translateY(0);
}

/* Primary confirm button (cyan) */
.lgc-btn--confirm.lgc-btn--primary {
    background: linear-gradient(135deg, var(--neon-cyan, #00f5d4), var(--neon-blue, #4cc9f0));
    color: var(--bg-deep, #0a0a0f);
    border: 1px solid transparent;
}

.lgc-btn--confirm.lgc-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 245, 212, 0.35);
}

.lgc-btn--confirm.lgc-btn--primary:active {
    transform: translateY(0);
}

/* Danger confirm button (magenta) */
.lgc-btn--confirm.lgc-btn--danger {
    background: linear-gradient(135deg, var(--neon-magenta, #f72585), rgba(247, 37, 133, 0.7));
    color: #ffffff;
    border: 1px solid rgba(247, 37, 133, 0.4);
}

.lgc-btn--confirm.lgc-btn--danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(247, 37, 133, 0.4);
}

.lgc-btn--confirm.lgc-btn--danger:active {
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — full width on small screens
   ============================================================ */

@media (max-width: 640px) {
    .lgc-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .lgc-modal {
        max-width: 100%;
        clip-path: polygon(
            0 0,
            calc(100% - 14px) 0,
            100% 14px,
            100% 100%,
            14px 100%,
            0 calc(100% - 14px)
        );
    }

    .lgc-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .lgc-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .lgc-overlay,
    .lgc-modal,
    .lgc-btn {
        transition: none !important;
        animation: none !important;
    }
}
