/**
 * Gated Content Modal Styles
 * Luxury design system matching ENNU brand
 *
 * @package ENNU\RetailShop
 * @version 1.0.0
 */

/* Modal Overlay */
.ennu-gated-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ennu-gated-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(30, 41, 59, 0.92) 100%);
    backdrop-filter: blur(8px);
}

/* Modal Content */
.ennu-gated-modal-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f9f7f3 100%);
    border-radius: 24px;
    padding: 48px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.3),
                0 12px 28px rgba(212, 175, 55, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.ennu-gated-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #64748b;
}

.ennu-gated-modal-close:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    transform: rotate(90deg);
}

.ennu-gated-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Modal Header */
.ennu-gated-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.ennu-gated-modal-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.ennu-gated-modal-header p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Form */
.ennu-gated-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ennu-gated-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ennu-gated-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ennu-gated-form-group label .required {
    color: #ef4444;
    font-size: 16px;
}

.ennu-gated-form-group input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: #1e293b;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ennu-gated-form-group input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.ennu-gated-form-group input::placeholder {
    color: #94a3b8;
}

/* Form Actions */
.ennu-gated-form-actions {
    margin-top: 12px;
}

.ennu-gated-btn-primary {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #0a1628;
    background: linear-gradient(135deg, #d4af37 0%, #c9a962 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ennu-gated-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ennu-gated-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.ennu-gated-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ennu-gated-btn-secondary {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    background: rgba(100, 116, 139, 0.1);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ennu-gated-btn-secondary:hover {
    background: rgba(100, 116, 139, 0.15);
    border-color: #cbd5e1;
}

/* Privacy Notice */
.ennu-gated-privacy-notice {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    margin: 12px 0 0 0;
    line-height: 1.5;
}

/* Success State */
.ennu-gated-success {
    text-align: center;
    padding: 24px 0;
}

.ennu-gated-success-icon {
    margin-bottom: 24px;
}

.ennu-gated-success-icon svg {
    animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.ennu-gated-success h3 {
    font-size: 28px;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 12px 0;
}

.ennu-gated-success p {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* Error State */
.ennu-gated-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.08) 100%);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 16px;
}

.ennu-gated-error p {
    margin: 0;
    font-size: 14px;
    color: #dc2626;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .ennu-gated-modal {
        padding: 12px;
    }

    .ennu-gated-modal-content {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .ennu-gated-modal-header h2 {
        font-size: 26px;
    }

    .ennu-gated-modal-header p {
        font-size: 15px;
    }

    .ennu-gated-form {
        gap: 16px;
    }

    .ennu-gated-btn-primary {
        padding: 14px 24px;
        font-size: 15px;
    }

    .ennu-gated-success h3 {
        font-size: 24px;
    }

    .ennu-gated-success p {
        font-size: 15px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .ennu-gated-modal-content {
        animation: none;
    }

    .ennu-gated-modal-close:hover {
        transform: none;
    }

    .ennu-gated-btn-primary:hover:not(:disabled) {
        transform: none;
    }

    .ennu-gated-success-icon svg {
        animation: none;
    }
}

/* Focus Visible for Keyboard Navigation */
.ennu-gated-modal-close:focus-visible,
.ennu-gated-form-group input:focus-visible,
.ennu-gated-btn-primary:focus-visible,
.ennu-gated-btn-secondary:focus-visible {
    outline: 3px solid #d4af37;
    outline-offset: 2px;
}
