/* ==========================================================================
   ACF Block: Newsletter Section
   Centered, max ~42rem content width. Form uses bottom-border only.
   ========================================================================== */

.newsletter-block {
    background-color: var(--block-bg-override, var(--ovelia-colors-stone-50));
    border-top:       var(--block-border-top, 1px solid var(--ovelia-colors-semantic-border));
    border-bottom:    var(--block-border-bottom, none);
    padding-block:    var(--ovelia-block-padding-block);
}

/* --------------------------------------------------------------------------
   Inner — centered, constrained width
   -------------------------------------------------------------------------- */
.newsletter-block__inner {
    max-width:      42rem;
    margin:         0 auto;
    padding-inline: var(--ovelia-layout-side-padding);
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            var(--ovelia-spacing-step-6);
}

/* --------------------------------------------------------------------------
   Heading
   -------------------------------------------------------------------------- */
.newsletter-block__heading {
    font-family:  var(--ovelia-font-style-section-header-family);
    font-size:    var(--ovelia-font-style-section-header-size);
    font-weight:  var(--ovelia-font-style-section-header-weight);
    line-height:  var(--ovelia-font-style-section-header-line-height);
    color:        var(--ovelia-colors-semantic-text);
    text-align:   center;
    margin:       0;
}

/* --------------------------------------------------------------------------
   Subtitle
   -------------------------------------------------------------------------- */
.newsletter-block__subtitle {
    font-family: var(--ovelia-typography-fontfamily-sans);
    font-size:   var(--ovelia-typography-fontsize-base);
    line-height: var(--ovelia-typography-lineheight-normal);
    color:       var(--ovelia-colors-semantic-text-subtle);
    text-align:  center;
    margin:      0;
    max-width:   35rem;
}

/* --------------------------------------------------------------------------
   Form — inline row with bottom border only
   -------------------------------------------------------------------------- */
.newsletter-block__form {
    display:        flex;
    gap:            1.5rem;
    border-bottom:  1px solid var(--ovelia-colors-semantic-border);
    width:          100%;
    align-items:    center;
    padding-bottom: var(--ovelia-spacing-step-2);
}

.newsletter-block__input {
    flex:           1;
    border:         none;
    outline:        none;
    background:     transparent;
    padding:        0.4375rem 0;
    font-family:    var(--ovelia-typography-fontfamily-sans);
    font-size:      var(--ovelia-typography-fontsize-base);
    font-weight:    var(--ovelia-typography-fontweight-semibold);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color:          var(--ovelia-colors-semantic-text);
    min-width:      0;
}

.newsletter-block__input::placeholder {
    color:       var(--ovelia-colors-semantic-text-subtler);
    font-weight: var(--ovelia-typography-fontweight-normal);
}

.newsletter-block__submit {
    flex-shrink:    0;
    border:         none;
    background:     transparent;
    padding:        0.4375rem 0;
    font-family:    var(--ovelia-typography-fontfamily-sans);
    font-size:      var(--ovelia-typography-fontsize-base);
    font-weight:    var(--ovelia-typography-fontweight-semibold);
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color:          var(--ovelia-colors-semantic-text);
    white-space:    nowrap;
    cursor:         pointer;
    transition:     opacity 0.2s ease;
}

.newsletter-block__submit:hover,
.newsletter-block__submit:focus {
    opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
    .newsletter-block__submit {
        transition: none;
    }
}
