/* Bloom Platform Value-Driven Newsletter Popup - CSS */

/* Font imports for Brevo form */
@font-face {
    font-display: block;
    font-family: Roboto;
    src: url(https://assets.brevo.com/font/Roboto/Latin/normal/normal/7529907e9eaf8ebb5220c5f9850e3811.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/normal/normal/25c678feafdc175a70922a116c9be3e7.woff) format("woff")
}

@font-face {
    font-display: fallback;
    font-family: Roboto;
    font-weight: 600;
    src: url(https://assets.brevo.com/font/Roboto/Latin/medium/normal/6e9caeeafb1f3491be3e32744bc30440.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/medium/normal/71501f0d8d5aa95960f6475d5487d4c2.woff) format("woff")
}

@font-face {
    font-display: fallback;
    font-family: Roboto;
    font-weight: 700;
    src: url(https://assets.brevo.com/font/Roboto/Latin/bold/normal/3ef7cf158f310cf752d5ad08cd0e7e60.woff2) format("woff2"), url(https://assets.brevo.com/font/Roboto/Latin/bold/normal/ece3a1d82f18b60bcce0211725c476aa.woff) format("woff")
}

/* Main popup overlay */
.bloom-newsletter-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.bloom-newsletter-popup.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Popup content container */
.bloom-popup-content {
    background: white;
    border-radius: 20px;
    max-width: 640px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Popup header */
.bloom-popup-header {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
    padding: 32px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.bloom-popup-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.bloom-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.bloom-popup-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.2;
}

.bloom-popup-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bloom-offer-badge {
    background: #fbbf24;
    color: #92400e;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2.5s infinite;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Form styling */
.bloom-popup-form {
    padding: 0;
}

/* Value Section */
.bloom-value-section {
    padding: 32px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.bloom-benefits {
    margin-bottom: 24px;
}

.bloom-benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bloom-benefit-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 32px;
    text-align: center;
}

.bloom-benefit-text {
    font-size: 15px;
    font-weight: 500;
    color: #475569;
}

/* CTA Buttons */
.bloom-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bloom-platform-cta {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.3);
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bloom-platform-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(22, 163, 74, 0.4);
    text-decoration: none;
    color: white;
}

.bloom-cta-text {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.bloom-cta-subtext {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
    margin-top: 2px;
}

.bloom-learn-more {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bloom-learn-more:hover {
    background: rgba(22, 163, 74, 0.1);
    text-decoration: none;
    color: #15803d;
}

/* Newsletter Section */
.bloom-newsletter-section {
    padding: 32px;
}

.bloom-newsletter-header {
    text-align: center;
    margin-bottom: 24px;
}

.bloom-newsletter-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bloom-newsletter-desc {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Override Brevo form styles for popup */
.bloom-newsletter-popup #sib-container {
    max-width: 100% !important;
    border: none !important;
    background-color: transparent !important;
    padding: 0 !important;
}

.bloom-newsletter-popup .sib-form {
    background-color: transparent !important;
}

.bloom-email-input {
    width: 100% !important;
    padding: 16px 20px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, sans-serif !important;
    transition: all 0.2s ease !important;
    background: white !important;
}

.bloom-email-input:focus {
    outline: none !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
}

.bloom-email-input::placeholder {
    color: #9ca3af !important;
    font-weight: 400 !important;
}

.bloom-newsletter-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.bloom-newsletter-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.3) !important;
}

/* Trust Section */
.bloom-trust-section {
    padding: 20px 32px 32px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    border-radius: 0 0 20px 20px;
}

.bloom-trust-text {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .bloom-popup-content {
        width: 95%;
        margin: 20px;
    }
    
    .bloom-popup-header {
        padding: 24px 20px;
    }
    
    .bloom-popup-title {
        font-size: 26px;
    }
    
    .bloom-popup-subtitle {
        font-size: 16px;
    }
    
    .bloom-value-section,
    .bloom-newsletter-section {
        padding: 24px 20px;
    }
    
    .bloom-trust-section {
        padding: 16px 20px 24px;
    }
    
    .bloom-benefit-text {
        font-size: 14px;
    }
    
    .bloom-platform-cta {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .bloom-cta-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .bloom-popup-content {
        width: 98%;
        margin: 10px;
    }
    
    .bloom-popup-header {
        padding: 20px 16px;
    }
    
    .bloom-popup-title {
        font-size: 22px;
    }
    
    .bloom-value-section,
    .bloom-newsletter-section {
        padding: 20px 16px;
    }
    
    .bloom-cta-buttons {
        gap: 10px;
    }
    
    .bloom-benefit-item {
        margin-bottom: 12px;
    }
}

/* Hide popup by default until shown */
.bloom-newsletter-popup:not(.show) {
    display: none !important;
}

/* Accessibility improvements */
.bloom-popup-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.bloom-platform-cta:focus,
.bloom-learn-more:focus,
.bloom-newsletter-btn:focus {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Loading state for buttons */
.bloom-platform-cta:disabled,
.bloom-newsletter-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Success and error message styling */
.bloom-newsletter-popup .sib-form-message-panel {
    margin-bottom: 15px;
    border-radius: 12px !important;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.bloom-newsletter-popup .sib-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* Smooth transitions */
* {
    box-sizing: border-box;
}

.bloom-newsletter-popup * {
    transition: all 0.2s ease;
}