/**
 * Content Gate - Frontend Styles
 * Styling for the gated content overlay and animations
 */

/* Hide gated content initially */
.content-gate-hidden {
    display: none !important;
    opacity: 0;
}

/* Revealed content animation */
.content-gate-revealed {
    animation: contentFadeIn 0.6s ease-in-out;
    opacity: 1 !important;
}

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

/* Gate Overlay */
.content-gate-overlay {
    position: relative;
    width: 100%;
    margin: 40px 0;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-in-out;
}

.content-gate-overlay.content-gate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gate Container */
.content-gate-container {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Gate Header */
.content-gate-header {
    text-align: center;
    margin-bottom: 30px;
}

.content-gate-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.content-gate-header p {
    font-size: 16px;
    color: #718096;
    margin: 0;
    line-height: 1.6;
}

/* Gate Form */
.content-gate-form {
    margin-top: 30px;
}

.content-gate-form .wpforms-container {
    margin: 0;
}

.content-gate-form .wpforms-form {
    margin: 0;
}

/* Hide WP Forms noscript message */
.content-gate-form .wpforms-notice,
.content-gate-form .wpforms-error-noscript,
.content-gate-form noscript {
    display: none !important;
}

.content-gate-form .wpforms-field-container {
    margin-bottom: 0;
}

.content-gate-form .wpforms-field {
    margin-bottom: 20px;
}

.content-gate-form input[type="text"],
.content-gate-form input[type="email"],
.content-gate-form input[type="tel"],
.content-gate-form textarea,
.content-gate-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.content-gate-form input[type="text"]:focus,
.content-gate-form input[type="email"]:focus,
.content-gate-form input[type="tel"]:focus,
.content-gate-form textarea:focus,
.content-gate-form select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.content-gate-form .wpforms-submit-container {
    text-align: center;
    margin-top: 25px;
}

.content-gate-form button[type="submit"],
.content-gate-form input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.content-gate-form button[type="submit"]:hover,
.content-gate-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Loader */
.content-gate-loader {
    text-align: center;
    padding: 40px 20px;
}

.content-gate-loader .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.content-gate-loader p {
    color: #718096;
    font-size: 14px;
    margin: 0;
}

/* Success Animation */
.content-gate-overlay.content-gate-unlocking {
    animation: pulseOverlay 0.6s ease-in-out;
}

@keyframes pulseOverlay {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.content-gate-success {
    text-align: center;
    padding: 40px 20px;
    animation: successFadeIn 0.5s ease-in-out;
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.content-gate-success .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ffffff;
    font-weight: bold;
    animation: successIcon 0.6s ease-in-out;
}

@keyframes successIcon {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.content-gate-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.content-gate-success p {
    font-size: 16px;
    color: #718096;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-gate-overlay {
        margin: 30px 0;
        padding: 40px 15px;
        border-radius: 8px;
    }
    
    .content-gate-container {
        padding: 30px 20px;
    }
    
    .content-gate-header h3 {
        font-size: 24px;
    }
    
    .content-gate-header p {
        font-size: 15px;
    }
    
    .content-gate-form input[type="text"],
    .content-gate-form input[type="email"],
    .content-gate-form input[type="tel"],
    .content-gate-form textarea {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .content-gate-form button[type="submit"],
    .content-gate-form input[type="submit"] {
        padding: 12px 30px;
        font-size: 15px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .content-gate-overlay {
        margin: 20px 0;
        padding: 30px 10px;
        border-radius: 6px;
    }
    
    .content-gate-container {
        padding: 25px 15px;
    }
    
    .content-gate-header h3 {
        font-size: 20px;
    }
    
    .content-gate-header p {
        font-size: 14px;
    }
    
    .content-gate-success .success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
}

/* Elementor specific adjustments */
.elementor-widget-container .content-gate-overlay {
    margin-top: 0;
}

/* Ensure gate appears above Elementor content */
.content-gate-overlay {
    z-index: 999;
}

/* Smooth transitions for Elementor sections */
.elementor-section.content-gate-hidden,
.elementor-widget.content-gate-hidden {
    display: none !important;
}

.elementor-section.content-gate-revealed,
.elementor-widget.content-gate-revealed {
    display: block !important;
}

/* Privacy notice (optional) */
.content-gate-privacy {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.content-gate-privacy p {
    font-size: 12px;
    color: #a0aec0;
    margin: 0;
    line-height: 1.5;
}

.content-gate-privacy a {
    color: #667eea;
    text-decoration: none;
}

.content-gate-privacy a:hover {
    text-decoration: underline;
}
