/* ============================================
   WAITLIST MODAL
   Product waitlist signup modal
   ============================================ */

/* Modal Container */
.waitlist-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.waitlist-modal.active {
    display: flex;
}

/* Backdrop with blur */
.waitlist-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Container */
.waitlist-modal-container {
    position: relative;
    background: linear-gradient(180deg, #1a1a24 0%, #12121a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(67, 132, 255, 0.1);
    animation: waitlistModalIn 0.3s ease-out;
}

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

/* Close Button */
.waitlist-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.waitlist-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.6);
}

.waitlist-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.waitlist-modal-close:hover svg {
    stroke: #fff;
}

/* State containers */
.waitlist-state {
    text-align: center;
}

/* Icon - Centered */
.waitlist-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px auto;
    background: linear-gradient(135deg, rgba(67, 132, 255, 0.15) 0%, rgba(123, 66, 255, 0.15) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waitlist-modal-icon svg {
    width: 36px;
    height: 36px;
}

/* Title */
.waitlist-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--vc-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

/* Subtitle */
.waitlist-modal-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

/* Description */
.waitlist-modal-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Form */
.waitlist-form {
    text-align: left;
}

.waitlist-form-group {
    margin-bottom: 20px;
}

.waitlist-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.waitlist-form-group label .required {
    color: var(--vc-status-unsupported);
}

.waitlist-form-group label .optional {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.waitlist-form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--vc-text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.waitlist-form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.waitlist-form-group input:focus {
    outline: none;
    border-color: rgba(67, 132, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(67, 132, 255, 0.1);
}

/* Submit Button */
.waitlist-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #4384ff 0%, #7b42ff 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.waitlist-submit-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.waitlist-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67, 132, 255, 0.4);
}

.waitlist-submit-btn:hover svg {
    transform: translateX(4px);
}

.waitlist-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.waitlist-submit-btn.loading {
    pointer-events: none;
}

.waitlist-submit-btn.loading span {
    opacity: 0;
}

.waitlist-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success State */
.waitlist-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waitlist-success-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--vc-status-supported);
}

.waitlist-success-message {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 28px;
    line-height: 1.6;
}

.waitlist-done-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.waitlist-done-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   LIGHT THEME SUPPORT
   ============================================ */

[data-theme="light"] .waitlist-modal-backdrop {
    background: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .waitlist-modal-container {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow:
        0 24px 80px rgba(15, 23, 42, 0.2),
        0 0 60px rgba(67, 132, 255, 0.05);
}

[data-theme="light"] .waitlist-modal-close {
    background: rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .waitlist-modal-close svg {
    stroke: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .waitlist-modal-close:hover {
    background: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .waitlist-modal-close:hover svg {
    stroke: #0f172a;
}

[data-theme="light"] .waitlist-modal-title {
    color: #0f172a;
}

[data-theme="light"] .waitlist-modal-subtitle {
    color: #475569;
}

[data-theme="light"] .waitlist-modal-description {
    color: #64748b;
}

[data-theme="light"] .waitlist-form-group label {
    color: #334155;
}

[data-theme="light"] .waitlist-form-group input {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
}

[data-theme="light"] .waitlist-form-group input::placeholder {
    color: rgba(15, 23, 42, 0.4);
}

[data-theme="light"] .waitlist-form-group input:focus {
    background: #ffffff;
    border-color: rgba(67, 132, 255, 0.5);
}

[data-theme="light"] .waitlist-success-message {
    color: #64748b;
}

[data-theme="light"] .waitlist-done-btn {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.15);
    color: #334155;
}

[data-theme="light"] .waitlist-done-btn:hover {
    background: rgba(15, 23, 42, 0.1);
}
