/* =========================================================
   Mailchimp Modal — Teaser Widget
   Connected email input + subscribe button (mc4wp style)
   ========================================================= */

.mcm-teaser {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Override theme default form field styles for the teaser input */
.mcm-teaser input.mcm-teaser-input[type="email"] {
    /* Layout */
    flex: 1;
    width: 100% !important;
    height: 44px !important;
    min-height: unset !important;
    box-sizing: border-box;

    /* Spacing */
    padding: 0.72rem 0.9rem !important;

    /* Typography */
    color: #333333 !important;
    font-size: 0.95rem;

    /* Borders — fully removed */
    appearance: none !important;
    border-width: 0 !important;
    border-style: solid !important;
    border-color: transparent !important;
    border-radius: 10px 0 0 10px !important;

    /* Background */
    background-color: #ffffff !important;

    /* Focus ring — replaced with our own */
    outline: none !important;
    outline-offset: 0 !important;

    /* Override theme transition */
    transition: none !important;

    cursor: pointer;
}

.mcm-teaser input.mcm-teaser-input[type="email"]::placeholder {
    color: #555555;
    opacity: 1;
}

.mcm-teaser input.mcm-teaser-input[type="email"]:focus {
    outline: none !important;
    border-color: transparent !important;
}

.mcm-teaser-btn {
    appearance: none;
    height: 44px;
    min-height: unset;
    padding: 0 1.15rem;
    border: 1px solid #4f83e3;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: #6495ed;
    color: #f2f2f2;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 160ms ease;
}

.mcm-teaser-btn:hover {
    background: var(--theme-palette-color-2);
}

.mcm-teaser-btn:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid rgba(100, 149, 237, 0.35);
    outline-offset: 0;
}

/* =========================================================
   Modal Overlay
   ========================================================= */

#mcm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: mcm-fade-in 0.2s ease;
}

#mcm-modal-overlay[hidden] {
    display: none;
}

@keyframes mcm-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =========================================================
   Modal Container
   ========================================================= */

#mcm-modal {
    position: relative;
    background: #f1f1f1;
    color: #222;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 100%;
    padding: 40px 36px 32px;
    animation: mcm-slide-up 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes mcm-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* =========================================================
   Close Button
   ========================================================= */

#mcm-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

#mcm-modal-close:hover,
#mcm-modal-close:focus {
    color: #111;
    background: #f0f0f0;
    outline: none;
}

/* =========================================================
   Mailchimp Form Styles (inside modal)
   ========================================================= */

#mcm-modal #mc_embed_signup {
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    width: 100%;
}

#mcm-modal #mc_embed_signup h2 {
    font-size: 1.4rem;
    margin: 0 0 12px;
    color: #111;
}

#mcm-modal .indicates-required {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 16px;
}

#mcm-modal .mc-field-group {
    margin-bottom: 14px;
}

#mcm-modal .mc-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.875rem;
    color: #333;
}

#mcm-modal .mc-field-group input[type="email"],
#mcm-modal .mc-field-group input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 0.72rem 0.9rem;
    border: 1px solid #b9c7e3;
    border-radius: 10px;
    background: #f1f1f1;
    color: var(--theme-palette-color-9, #222);
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#mcm-modal .mc-field-group input:focus {
    position: relative;
    z-index: 1;
    border-color: #4f83e3;
    outline: 2px solid rgba(100, 149, 237, 0.35);
    outline-offset: 0;
}

#mcm-modal .asterisk {
    color: #c00;
}

#mcm-modal #mc-embedded-subscribe.button {
    appearance: none;
    display: inline-block;
    margin-top: 8px;
    min-height: 44px;
    padding: 0.72rem 1.4rem;
    border: 1px solid #4f83e3;
    border-radius: 10px;
    background: #6495ed;
    color: #f2f2f2;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 160ms ease;
}

#mcm-modal #mc-embedded-subscribe.button:hover {
    background: var(--theme-palette-color-2);
}

#mcm-modal #mc-embedded-subscribe.button:focus-visible {
    outline: 2px solid rgba(100, 149, 237, 0.35);
    outline-offset: 0;
}

#mcm-modal .response {
    margin-top: 8px;
    font-size: 0.875rem;
}

#mcm-modal #mce-error-response   { color: #c00; }
#mcm-modal #mce-success-response { color: #1a7340; }
