/**
 * EmailOctopus Newsletter Form - Simple fixes only
 */

/* Container - wider and centered with premium border */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] {
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 30px !important;
    position: relative !important;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03), rgba(255, 107, 107, 0.03)) !important;
    border-radius: 20px !important;
    box-shadow: 
        0 0 0 1px rgba(255, 215, 0, 0.2),
        0 0 30px rgba(255, 215, 0, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.05) !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .inline-container {
    max-width: 750px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Add logo at the top */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"]::before {
    content: '';
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px auto;
    background-image: url('../public/img/visitorsguide-icon-light.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

[data-theme="dark"] [data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"]::before {
    background-image: url('../public/img/visitorsguide-icon-dark.svg');
}

/* Hide the duplicate titles from EmailOctopus */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .text-block h1,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .text-block div {
    display: none !important;
}

/* Premium ornate background SVG */
.newsletter {
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23FFD700;stop-opacity:0.1" /><stop offset="100%" style="stop-color:%23FF6B6B;stop-opacity:0.05" /></linearGradient></defs><path d="M50,200 Q100,100 200,150 T350,200 Q300,300 200,250 T50,200" fill="none" stroke="url(%23grad1)" stroke-width="2" opacity="0.3"/><circle cx="100" cy="100" r="80" fill="none" stroke="%23FFD700" stroke-width="1" opacity="0.1"/><path d="M200,50 L250,150 L150,150 Z" fill="none" stroke="%23FF6B6B" stroke-width="1" opacity="0.1"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: float-left 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.newsletter::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23FFB700;stop-opacity:0.1" /><stop offset="100%" style="stop-color:%23FF6B6B;stop-opacity:0.05" /></linearGradient></defs><g transform="rotate(45 200 200)"><rect x="100" y="100" width="200" height="200" fill="none" stroke="url(%23grad2)" stroke-width="2" opacity="0.2"/><circle cx="200" cy="200" r="150" fill="none" stroke="%23FFD700" stroke-width="1" opacity="0.1" stroke-dasharray="10,5"/></g><path d="M50,350 Q150,300 250,350 T350,300" fill="none" stroke="%23FFB700" stroke-width="1.5" opacity="0.15"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    animation: float-right 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float-left {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -20px) rotate(120deg); }
    66% { transform: translate(-20px, 30px) rotate(240deg); }
}

@keyframes float-right {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-30px, 20px) rotate(-120deg); }
    66% { transform: translate(20px, -30px) rotate(-240deg); }
}

/* Ensure form content is above background */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] {
    position: relative;
    z-index: 1;
}

/* Fix input fields visibility */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="text"],
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="email"] {
    width: 100% !important;
    padding: 12px 12px 12px 40px !important;
    background: white !important;
    color: black !important;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    margin-bottom: 10px !important;
}

/* Add required field indicators */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row {
    position: relative !important;
}

/* Required asterisk icon for first name and email */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input#field_1::before,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input#field_0::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23FFB700" stroke-width="2"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>');
    background-size: contain;
    pointer-events: none;
}

/* Add wrapper divs for icons */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row:has(input#field_1)::before,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row:has(input#field_0)::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23FFB700" stroke-width="1.5" opacity="0.6"><path d="M12 2l2.09 4.26L19 7.27l-3.5 3.44.83 4.85L12 13.4l-4.33 2.16.83-4.85L5 7.27l4.91-1.01L12 2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

/* Dark mode inputs */
[data-theme="dark"] [data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="text"],
[data-theme="dark"] [data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="email"] {
    background: #1a1a1a !important;
    color: white !important;
    border: 2px solid #444 !important;
    padding: 12px 12px 12px 40px !important;
}

/* Submit button - ornate premium style */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"] {
    width: auto !important;
    min-width: 200px !important;
    max-width: 300px !important;
    margin: 20px auto 10px auto !important;
    display: block !important;
    padding: 16px 40px !important;
    background: linear-gradient(135deg, #FFD700, #FF6B6B) !important;
    color: white !important;
    border: 2px solid transparent !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 
        0 0 0 1px rgba(255, 215, 0, 0.3),
        0 4px 15px rgba(255, 107, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
}

/* Ornate border effect */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FF6B6B, #FFD700, #FF6B6B);
    border-radius: 50px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 
        0 0 0 2px rgba(255, 215, 0, 0.4),
        0 8px 25px rgba(255, 107, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]:hover::before {
    opacity: 0.3 !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]:active {
    transform: translateY(1px) scale(0.98) !important;
    box-shadow: 
        0 0 0 1px rgba(255, 215, 0, 0.2),
        0 2px 8px rgba(255, 107, 107, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Loading state when clicked */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]:focus {
    animation: buttonPulse 0.6s ease-out !important;
    background: linear-gradient(135deg, #FFD700, #FF8A8A) !important;
}

@keyframes buttonPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(0.95);
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Processing state animation */
@keyframes buttonProcessing {
    0%, 100% {
        background: linear-gradient(135deg, #FFD700, #FF6B6B) !important;
        transform: scale(1);
    }
    25% {
        background: linear-gradient(135deg, #FFB700, #FF8A8A) !important;
        transform: scale(0.98);
    }
    50% {
        background: linear-gradient(135deg, #FFC700, #FFA0A0) !important;
        transform: scale(0.96);
    }
    75% {
        background: linear-gradient(135deg, #FFB700, #FF8A8A) !important;
        transform: scale(0.98);
    }
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"].processing {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.9 !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"].processing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    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); }
}

/* Add decorative elements to button */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]::after {
    content: '→';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input[type="submit"]:hover::after {
    transform: translateY(-50%) translateX(3px);
}

/* Hide success/error bars if empty */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-success-message:empty,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-error-message:empty {
    display: none !important;
}

/* When messages have content */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-success-message:not(:empty) {
    background: #10B981 !important;
    color: white !important;
    padding: 12px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-error-message:not(:empty) {
    background: #EF4444 !important;
    color: white !important;
    padding: 12px !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
}

/* Move logo to top */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .eo-image {
    order: -1 !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .eo-image img {
    display: block !important;
    margin: 0 auto 20px auto !important;
    max-width: 120px !important;
    height: auto !important;
}

/* Hide EmailOctopus branding */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] [eo-block="powered-by"] {
    display: none !important;
}

/* Remove all padding/margins - wider form */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Add exclusive text styling */
.newsletter .section-title {
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    background: linear-gradient(135deg, #FFD700, #FF6B6B) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 2px 10px rgba(255, 107, 107, 0.2) !important;
    position: relative !important;
}

.newsletter .section-description {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    font-size: 1.15rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Add sparkle animation */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.newsletter .section-title::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -30px;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.newsletter .section-title::before {
    content: '⭐';
    position: absolute;
    top: -5px;
    left: -25px;
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
    animation-delay: 1s;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .nurture-container {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .align-mid {
    padding: 0 !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .pt-5,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .pb-5,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .p-3,
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .p-4 {
    padding: 0 !important;
}

/* Focus states */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] input:focus {
    outline: none !important;
    border-color: #FFB700 !important;
}

/* Hide honeypot */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row-hp {
    display: none !important;
}

/* Fix consent checkbox alignment */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row-consent {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    margin: 15px auto !important;
    padding: 0 !important;
    max-width: 500px !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row-consent input[type="checkbox"] {
    margin: 3px 8px 0 0 !important;
    min-width: 18px !important;
    min-height: 18px !important;
    cursor: pointer !important;
}

[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] .emailoctopus-form-row-consent label {
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Add privacy promise text */
[data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] form::after {
    content: '🔒 We will never send spam or sell your data. One-click unsubscribe anytime.';
    display: block;
    margin-top: 12px;
    font-size: 0.75rem !important;
    color: var(--text-secondary) !important;
    opacity: 0.7 !important;
    text-align: center !important;
    font-style: italic !important;
    line-height: 1.4 !important;
}

[data-theme="dark"] [data-form="b86c840e-8ddc-11f0-8672-eb4f3285b857"] form::after {
    color: rgba(255, 255, 255, 0.5) !important;
}