/* Progressive Email Capture CTA Styles - English */

.progressive-cta-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 90%;
    max-width: 850px;
    z-index: 99999;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    opacity: 1;
}

.progressive-cta-container.hide-cta {
    transform: translateX(-50%) translateY(150px);
    opacity: 0;
    pointer-events: none;
}

/* Apple 2026 Liquid Glassmorphism design */
.progressive-cta-glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(30px) saturate(210%);
    -webkit-backdrop-filter: blur(30px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 40px;
    padding: 22px 35px;
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.03),
        0 20px 50px rgba(18, 38, 75, 0.12),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.progressive-cta-glass:hover {
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.03),
        0 24px 60px rgba(18, 38, 75, 0.16),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Close button */
.progressive-cta-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.progressive-cta-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a202c;
    transform: scale(1.05);
}

.progressive-cta-close:active {
    transform: scale(0.95);
}

/* Content layout */
.progressive-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
}

.progressive-cta-text {
    flex: 1;
}

.progressive-cta-text h3 {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.progressive-cta-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
}

/* Form & Input Styles */
.progressive-cta-form {
    flex: 1;
    max-width: 420px;
    width: 100%;
}

.progressive-cta-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 30px;
    padding: 4px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.progressive-cta-input-group:focus-within {
    border-color: #093c9d;
    box-shadow: 0 0 0 3px rgba(9, 60, 157, 0.15);
    background: #ffffff;
}

.progressive-cta-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 0.9rem;
    color: #0f172a;
    outline: none;
    width: 100%;
    text-align: left;
}

.progressive-cta-input-group input::placeholder {
    color: #94a3b8;
    text-align: left;
}

/* Button & Micro-animations */
.progressive-cta-submit {
    background: #093c9d;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(9, 60, 157, 0.2);
}

.progressive-cta-submit:hover {
    background: #072f7a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(9, 60, 157, 0.3);
}

.progressive-cta-submit:active {
    transform: translateY(1px);
}

.progressive-cta-submit .arrow-icon {
    transition: transform 0.25s ease;
}

.progressive-cta-submit:hover .arrow-icon {
    transform: translateX(4px); /* Moves right in LTR */
}

/* Loading indicator inside button */
.btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: cta-spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Error panel */
.progressive-cta-error {
    font-size: 0.8rem;
    color: #e11d48;
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.15);
    border-radius: 12px;
    padding: 8px 16px;
    text-align: left;
    margin-top: 4px;
}

.progressive-cta-container .hidden {
    display: none !important;
}

/* Responsive Rules (Mobile-first) */
@media (max-width: 768px) {
    .progressive-cta-container {
        bottom: 0;
        left: 0;
        transform: translateY(0);
        width: 100%;
        max-width: 100%;
    }
    
    .progressive-cta-container.hide-cta {
        transform: translateY(100%);
    }
    
    .progressive-cta-glass {
        border-radius: 24px 24px 0 0;
        padding: 24px 20px;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    
    .progressive-cta-close {
        top: 12px;
        right: 15px;
    }
    
    .progressive-cta-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .progressive-cta-text h3 {
        font-size: 1.05rem;
        padding-right: 20px; /* Leave space for close button */
    }
    
    .progressive-cta-text p {
        font-size: 0.8rem;
        margin-top: 2px;
    }
    
    .progressive-cta-form {
        max-width: 100%;
    }
}
