/* Boutique Heba MailChimp Popup Styles */

/* Popup Overlay - Elegant overlay matching Boutique Heba */
.boutiqueheba-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(92, 74, 61, 0.15) 50%, rgba(0, 0, 0, 0.45) 100%);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(5px);
}

.boutiqueheba-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Popup Container */
.boutiqueheba-popup-container {
    position: relative;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid rgba(92, 74, 61, 0.4);
    border-radius: 50px;
    padding: 50px 45px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(92, 74, 61, 0.4),
                0 0 100px rgba(92, 74, 61, 0.25),
                inset 0 0 30px rgba(92, 74, 61, 0.15);
    animation: popupSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.boutiqueheba-popup-overlay.active .boutiqueheba-popup-container {
    transform: scale(1);
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.boutiqueheba-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(92, 74, 61, 0.2);
    border: 2px solid rgba(92, 74, 61, 0.5);
    color: #5c4a3d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
    box-shadow: 0 0 15px rgba(92, 74, 61, 0.3);
}

.boutiqueheba-popup-close:hover {
    background: rgba(92, 74, 61, 0.4);
    border-color: #5c4a3d;
    color: #fff;
    transform: rotate(90deg);
    box-shadow: 0 0 25px rgba(92, 74, 61, 0.6);
}

.boutiqueheba-popup-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* Popup Content */
.boutiqueheba-popup-content {
    color: #333333;
    position: relative;
}

/* Logo Styling */
.boutiqueheba-popup-content .form-logo,
.boutiqueheba-custom-form-wrapper .form-logo {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeInDown 0.6s ease-out;
}

.boutiqueheba-popup-content .form-logo img,
.boutiqueheba-custom-form-wrapper .form-logo img {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(92, 74, 61, 0.4)) 
            drop-shadow(0 0 40px rgba(92, 74, 61, 0.2))
            drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.boutiqueheba-popup-content .form-logo img:hover,
.boutiqueheba-custom-form-wrapper .form-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(92, 74, 61, 0.6)) 
            drop-shadow(0 0 60px rgba(92, 74, 61, 0.3))
            drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MailChimp Form Styling */
.boutiqueheba-popup-content .mc4wp-form {
    margin: 0;
}

.boutiqueheba-popup-content .mc4wp-form input[type="text"],
.boutiqueheba-popup-content .mc4wp-form input[type="email"],
.boutiqueheba-popup-content .mc4wp-form input[type="tel"],
.boutiqueheba-popup-content .mc4wp-form input[type="url"],
.boutiqueheba-popup-content .mc4wp-form input[type="number"],
.boutiqueheba-popup-content .mc4wp-form input[type="date"],
.boutiqueheba-popup-content .mc4wp-form select,
.boutiqueheba-popup-content .mc4wp-form textarea,
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="text"],
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="email"],
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="tel"],
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="url"],
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="number"] {
    width: 100%;
    padding: 18px 25px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(92, 74, 61, 0.35);
    border-radius: 50px !important;
    color: #333333;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 195, 255, 0.1), inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.boutiqueheba-popup-content .mc4wp-form input:focus,
.boutiqueheba-popup-content .mc4wp-form select:focus,
.boutiqueheba-popup-content .mc4wp-form textarea:focus,
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="text"]:focus,
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="email"]:focus,
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="tel"]:focus,
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="url"]:focus,
.boutiqueheba-popup-content .boutiqueheba-custom-form input[type="number"]:focus {
    outline: none;
    border-color: #5c4a3d;
    background: #ffffff;
    box-shadow: 0 0 25px rgba(92, 74, 61, 0.5), 0 6px 20px rgba(92, 74, 61, 0.25), inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.01);
    border-radius: 50px !important;
}

.boutiqueheba-popup-content .mc4wp-form input::placeholder,
.boutiqueheba-popup-content .mc4wp-form textarea::placeholder {
    color: #999999;
}

/* Submit Button */
.boutiqueheba-popup-content .mc4wp-form input[type="submit"],
.boutiqueheba-popup-content .mc4wp-form button[type="submit"] {
    width: 100%;
    padding: 20px 30px;
    background: #5c4a3d;
    background-size: 200% 100%;
    border: 2px solid #5c4a3d;
    border-radius: 50px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(92, 74, 61, 0.4), 0 0 25px rgba(92, 74, 61, 0.3);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.boutiqueheba-popup-content .mc4wp-form input[type="submit"]::before,
.boutiqueheba-popup-content .mc4wp-form button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.boutiqueheba-popup-content .mc4wp-form input[type="submit"]:hover,
.boutiqueheba-popup-content .mc4wp-form button[type="submit"]:hover {
    background-position: 100% 0;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(92, 74, 61, 0.6), 0 0 35px rgba(92, 74, 61, 0.5);
}

.boutiqueheba-popup-content .mc4wp-form input[type="submit"]:hover::before,
.boutiqueheba-popup-content .mc4wp-form button[type="submit"]:hover::before {
    left: 100%;
}

.boutiqueheba-popup-content .mc4wp-form input[type="submit"]:active,
.boutiqueheba-popup-content .mc4wp-form button[type="submit"]:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 25px rgba(92, 74, 61, 0.5);
}

/* Labels */
.boutiqueheba-popup-content .mc4wp-form label {
    display: block;
    margin-bottom: 8px;
    color: #5c4a3d;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkboxes and Radio Buttons */
.boutiqueheba-popup-content .mc4wp-form input[type="checkbox"],
.boutiqueheba-popup-content .mc4wp-form input[type="radio"] {
    width: auto;
    margin-right: 8px;
    accent-color: #5c4a3d;
}

/* Messages */
.boutiqueheba-popup-content .mc4wp-form .mc4wp-alert {
    padding: 18px 25px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-weight: 600;
    border: 2px solid;
    font-size: 15px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.boutiqueheba-popup-content .mc4wp-form .mc4wp-success {
    background: rgba(92, 74, 61, 0.1);
    border-color: #5c4a3d;
    color: #5c4a3d;
    box-shadow: 0 0 15px rgba(92, 74, 61, 0.3);
}

.boutiqueheba-popup-content .mc4wp-form .mc4wp-error {
    background: rgba(92, 74, 61, 0.1);
    border-color: #5c4a3d;
    color: #5c4a3d;
    box-shadow: 0 0 15px rgba(92, 74, 61, 0.3);
}

.boutiqueheba-popup-content .mc4wp-form .mc4wp-notice {
    background: rgba(248, 248, 248, 0.95);
    border-color: rgba(92, 74, 61, 0.3);
    color: #333333;
}

/* Loading State */
.boutiqueheba-popup-content .mc4wp-form.loading input[type="submit"],
.boutiqueheba-popup-content .mc4wp-form.loading button[type="submit"] {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.boutiqueheba-popup-content .mc4wp-form.loading input[type="submit"]::after,
.boutiqueheba-popup-content .mc4wp-form.loading button[type="submit"]::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
.boutiqueheba-popup-container::-webkit-scrollbar {
    width: 8px;
}

.boutiqueheba-popup-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.boutiqueheba-popup-container::-webkit-scrollbar-thumb {
    background: rgba(92, 74, 61, 0.5);
    border-radius: 4px;
}

.boutiqueheba-popup-container::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 74, 61, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .boutiqueheba-popup-container {
        padding: 40px 25px;
        width: 95%;
        max-height: 95vh;
        border-radius: 40px;
    }
    
    .boutiqueheba-popup-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 26px;
    }
    
    .boutiqueheba-popup-content .form-logo,
    .boutiqueheba-custom-form-wrapper .form-logo {
        margin-bottom: 25px;
    }
    
    .boutiqueheba-popup-content .form-logo img,
    .boutiqueheba-custom-form-wrapper .form-logo img {
        max-width: 160px;
    }
    
    .boutiqueheba-popup-content .mc4wp-form input[type="text"],
    .boutiqueheba-popup-content .mc4wp-form input[type="email"],
    .boutiqueheba-popup-content .mc4wp-form input[type="tel"],
    .boutiqueheba-popup-content .mc4wp-form input[type="url"],
    .boutiqueheba-popup-content .mc4wp-form input[type="number"] {
        padding: 16px 22px;
        font-size: 15px;
    }
    
    .boutiqueheba-popup-content .mc4wp-form input[type="submit"],
    .boutiqueheba-popup-content .mc4wp-form button[type="submit"],
    .boutiqueheba-popup-content input[type="submit"] {
        padding: 18px 28px;
        font-size: 16px;
        letter-spacing: 1.5px;
    }
}

/* Success Animation */
.boutiqueheba-popup-success {
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Custom Form Styling - Email, Phone, Submit */
.boutiqueheba-popup-content p {
    margin: 0 0 20px 0;
    position: relative;
}

.boutiqueheba-popup-content p:last-of-type {
    margin-bottom: 0;
}

/* Fallback for browsers without :has() support */
.boutiqueheba-popup-content p label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding-left: 30px;
}

.boutiqueheba-popup-content p label input {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 16px 20px;
    border-radius: 10px;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

/* Email Field Styling */
.boutiqueheba-popup-content label[for="email"],
.boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"]) {
    display: block;
    margin-bottom: 12px;
    color: #5c4a3d;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding-left: 30px;
}

.boutiqueheba-popup-content label[for="email"]::before,
.boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"])::before {
    content: "✉";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #5c4a3d;
    text-shadow: 0 0 10px rgba(0, 195, 255, 0.6);
}

.boutiqueheba-popup-content label[for="email"] input[type="email"],
.boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"]) input[type="email"] {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(92, 74, 61, 0.4);
    border-radius: 50px !important;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 195, 255, 0.1), inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.boutiqueheba-popup-content label[for="email"] input[type="email"]:focus,
.boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"]) input[type="email"]:focus {
    outline: none;
    border-color: #5c4a3d;
    background: #ffffff;
    border-radius: 50px !important;
    box-shadow: 0 0 30px rgba(92, 74, 61, 0.5),
                0 8px 25px rgba(92, 74, 61, 0.25),
                inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px) scale(1.01);
}

.boutiqueheba-popup-content label[for="email"] input[type="email"]::placeholder,
.boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"]) input[type="email"]::placeholder {
    color: #999999;
    font-style: italic;
}

/* Phone Field Styling */
.boutiqueheba-popup-content label:has(input[name="FIELD"]) {
    display: block;
    margin-bottom: 12px;
    color: #5c4a3d;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding-left: 30px;
}

.boutiqueheba-popup-content label:has(input[name="FIELD"])::before {
    content: "📱";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #5c4a3d;
    text-shadow: 0 0 10px rgba(92, 74, 61, 0.6);
}

.boutiqueheba-popup-content label:has(input[name="FIELD"]) input[name="FIELD"] {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(92, 74, 61, 0.4);
    border-radius: 50px !important;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(92, 74, 61, 0.1), inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.boutiqueheba-popup-content label:has(input[name="FIELD"]) input[name="FIELD"]:focus {
    outline: none;
    border-color: #5c4a3d;
    background: #ffffff;
    border-radius: 50px !important;
    box-shadow: 0 0 30px rgba(92, 74, 61, 0.5),
                0 8px 25px rgba(92, 74, 61, 0.25),
                inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px) scale(1.01);
}

.boutiqueheba-popup-content label:has(input[name="FIELD"]) input[name="FIELD"]::placeholder {
    color: #999999;
    font-style: italic;
}

/* Submit Button Styling */
.boutiqueheba-popup-content p:has(input[type="submit"]) {
    margin-top: 30px;
    margin-bottom: 0;
}

.boutiqueheba-popup-content input[type="submit"] {
    width: 100%;
    padding: 22px 35px;
    background: #5c4a3d;
    background-size: 200% 100%;
    border: 2px solid #5c4a3d;
    border-radius: 50px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(38, 184, 235, 0.4),
                0 0 25px rgba(38, 184, 235, 0.3);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
}

.boutiqueheba-popup-content input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.boutiqueheba-popup-content input[type="submit"]:hover {
    background-position: 100% 0;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(38, 184, 235, 0.6),
                0 0 35px rgba(38, 184, 235, 0.5);
    border-color: #5c4a3d;
}

.boutiqueheba-popup-content input[type="submit"]:hover::before {
    left: 100%;
}

.boutiqueheba-popup-content input[type="submit"]:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 25px rgba(92, 74, 61, 0.5),
                0 0 20px rgba(92, 74, 61, 0.2);
}

/* Form Field Animation on Load */
.boutiqueheba-popup-content p:has(label[for="email"]) {
    animation: slideInLeft 0.5s ease-out 0.1s both;
}

.boutiqueheba-popup-content p:has(label:has(input[name="FIELD"])) {
    animation: slideInLeft 0.5s ease-out 0.3s both;
}

.boutiqueheba-popup-content p:has(input[type="submit"]) {
    animation: slideInUp 0.5s ease-out 0.5s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments for custom form */
@media (max-width: 768px) {
    .boutiqueheba-popup-content .form-logo,
    .boutiqueheba-custom-form-wrapper .form-logo {
        margin-bottom: 20px;
    }
    
    .boutiqueheba-popup-content .form-logo img,
    .boutiqueheba-custom-form-wrapper .form-logo img {
        max-width: 140px;
    }
    
    .boutiqueheba-popup-content label[for="email"],
    .boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"]),
    .boutiqueheba-popup-content label:has(input[name="FIELD"]) {
        font-size: 13px;
        padding-left: 25px;
        margin-bottom: 10px;
    }
    
    .boutiqueheba-popup-content label[for="email"]::before,
    .boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"])::before,
    .boutiqueheba-popup-content label:has(input[name="FIELD"])::before {
        font-size: 16px;
    }
    
    .boutiqueheba-popup-content label[for="email"] input[type="email"],
    .boutiqueheba-popup-content label:has(input[type="email"][name="EMAIL"]) input[type="email"],
    .boutiqueheba-popup-content label:has(input[name="FIELD"]) input[name="FIELD"] {
        padding: 16px 22px;
        font-size: 15px;
    }
    
    .boutiqueheba-popup-content input[type="submit"] {
        padding: 18px 28px;
        font-size: 16px;
        letter-spacing: 1.5px;
    }
}
