/**
 * Upgrade Modal - Simple & Clean
 * 
 * Header: Title left, Close right
 * Content: Centered paragraph + button
 * No gradients, minimal design
 * Uses global CSS variables for spacing
 */

/* ============================================
   BACKDROP
   ============================================ */

:root {
    --lex-modal-backdrop-bg: color-mix(in srgb, var(--wp-color-black) 50%, transparent);
    --lex-modal-bg: var(--lex-color-surface);
    --lex-modal-border-color: var(--lex-color-border);
    --lex-modal-title-color: var(--lex-color-text);
    --lex-modal-text-color: var(--lex-color-text-muted);
    --lex-modal-close-color: var(--lex-color-text-muted);
    --lex-modal-close-hover-color: var(--lex-color-text);
    --lex-modal-close-hover-border-color: var(--lex-color-border-hover);
    --lex-modal-radius: var(--lex-radius-md);
    --lex-modal-shadow: 0 10px 40px color-mix(in srgb, var(--wp-color-black) 20%, transparent);
}

.lex-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--lex-modal-backdrop-bg);
    backdrop-filter: blur(3px);
    z-index: 100000;
    padding: var(--lex-space-4);
    overflow-y: auto;
    opacity: 0;
    transition: opacity var(--lex-transition-base);
}

.lex-modal-backdrop.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lex-modal-backdrop.is-closing {
    opacity: 0;
}

/* ============================================
   MODAL: SIMPLE & CLEAN
   ============================================ */

.lex-modal {
    background: var(--lex-modal-bg);
    border-radius: var(--lex-modal-radius);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--lex-modal-shadow);
    transform: translateY(0);
    transition: transform var(--lex-transition-base);
}

.lex-modal-backdrop.is-open .lex-modal {
    animation: slideUp 0.25s ease-out;
}

.lex-modal-backdrop.is-closing .lex-modal {
    transform: translateY(20px);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   HEADER: Title Left, Close Right
   ============================================ */

.lex-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--lex-space-2) var(--lex-space-6);
    border-bottom: 1px solid var(--lex-modal-border-color);
}

.lex-modal__header h3 {
    font-size: var(--lex-font-size-2xl);
    font-weight: var(--lex-font-weight-semibold);
    color: var(--lex-modal-title-color);
    margin: 0;
}

.lex-modal__close {
    background: transparent;
    border: 1px solid var(--lex-modal-border-color);
    width: var(--lex-space-8);
    height: var(--lex-space-8);
    border-radius: var(--lex-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--lex-modal-close-color);
    transition: all var(--lex-transition-fast);
    flex-shrink: 0;
}

.lex-modal__close:hover {
    color: var(--lex-modal-close-hover-color);
    border-color: var(--lex-modal-close-hover-border-color);
}

.lex-modal__close .dashicons {
    font-size: var(--lex-font-size-3xl);
    width: var(--lex-space-6);
    height: var(--lex-space-6);
    line-height: 1;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    display: block;
}

/* ============================================
   CONTENT: Centered Paragraph + Button
   ============================================ */

.lex-modal__content {
    padding: var(--lex-space-6);
    text-align: center;
}

.lex-modal__content p {
    font-size: var(--lex-font-size-lg);
    line-height: 1.6;
    color: var(--lex-modal-text-color);
    margin: 0 0 var(--lex-space-6);
}

.lex-btn--upgrade {
    display: inline-block;
    padding-block: var(--lex-space-3);
    padding-inline: var(--lex-space-8);
    background: var(--lex-color-primary);
    color: var(--lex-color-primary-contrast);
    font-size: var(--lex-font-size-lg);
    font-weight: var(--lex-font-weight-semibold);
    border: none;
    border-radius: var(--lex-radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--lex-transition-fast);
}

.lex-btn--upgrade:hover {
    background: var(--lex-color-primary-hover);
    color: var(--lex-color-primary-contrast);
    transform: translateY(-1px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 520px) {
    .lex-modal {
        max-width: 100%;
    }
    
    .lex-modal__header {
        padding: var(--lex-space-2) var(--lex-space-4);
    }
    
    .lex-modal__header h3 {
        font-size: var(--lex-font-size-lg);
    }
    
    .lex-modal__content {
        padding: var(--lex-space-4);
    }
    
    .lex-modal__content p {
        font-size: var(--lex-font-size-base);
    }
}
