/* Newsletter subscribe popup, persistent widget, and footer subscribe form.
   Loaded only where the popup/widget aren't excluded — see
   vd_subscribe_enqueue_assets() in inc/subscribe-popup.php. */

/* ---------- Popup ---------- */

.vd-subscribe-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .6);
    z-index: 9997;
    display: none;
    overflow: auto;
}
.vd-subscribe-popup-overlay.is-shown {
    display: flex;
    align-items: center;
    justify-content: center;
}
.vd-subscribe-popup-container {
    position: relative;
    display: flex;
    width: 800px;
    max-width: 94vw;
    min-height: 500px;
    background-color: #000000;
    margin: 30px auto;
    overflow: hidden;
}
.vd-subscribe-popup-photo-wrap {
    flex: 0 0 50%;
    position: relative;
    background-color: #1a1a1a;
}
.vd-subscribe-popup-photo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .2s ease;
}
.vd-subscribe-popup-photo.is-active {
    opacity: 1;
}
.vd-subscribe-popup-panel {
    flex: 0 0 50%;
    position: relative;
    padding: 60px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}
.vd-subscribe-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vd-subscribe-screen {
    display: none;
}
.vd-subscribe-screen.is-active {
    display: block;
}

.vd-subscribe-headline {
    font-family: "TexGyreHeros-bold";
    font-weight: normal;
    text-transform: uppercase;
    font-size: 26px;
    line-height: 1.25;
    margin: 0 0 20px;
    color: #ffffff;
}
.vd-subscribe-paragraph {
    font-family: "TexGyreHeros-regular";
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 28px;
    color: #ffffff;
}
.vd-subscribe-screen-form .vd-subscribe-paragraph strong,
.vd-subscribe-screen-form .vd-subscribe-paragraph b {
    font-family: "TexGyreHeros-bold";
}

.vd-subscribe-form {
    display: flex;
    flex-direction: column;
}
.vd-subscribe-field-wrap {
    margin-bottom: 14px;
}
.vd-subscribe-input {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .5);
    color: #ffffff;
    padding: 14px 16px;
    font-family: "TexGyreHeros-regular";
    font-size: 14px;
}
.vd-subscribe-input::placeholder {
    color: rgba(255, 255, 255, .6);
}
.vd-subscribe-input:focus {
    outline: none;
    border-color: #ffffff;
}
.vd-subscribe-input.is-invalid {
    border-color: #e04040;
}
.vd-subscribe-field-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 6px;
    min-height: 16px;
    display: none;
}
.vd-subscribe-field-error.is-shown {
    display: block;
}

.vd-subscribe-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #ffffff;
    margin: 4px 0 24px;
    cursor: pointer;
}
.vd-subscribe-consent-label input[type="checkbox"] {
    margin-top: 3px;
    flex: 0 0 auto;
}
.vd-subscribe-consent-label a {
    color: #ffffff;
    text-decoration: underline;
}
.vd-subscribe-consent-label.is-invalid {
    color: #ff6b6b;
}
.vd-subscribe-consent-label.is-invalid a {
    color: #ff6b6b;
}

.vd-subscribe-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #ffffff;
    color: #000000;
    border: 0;
    padding: 16px 24px;
    font-family: "TexGyreHeros-bold";
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .04em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.vd-subscribe-submit:hover {
    background-color: #eeeeee;
}
.vd-subscribe-submit:disabled {
    opacity: .6;
    cursor: default;
}
.vd-subscribe-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, .3);
    border-top-color: #000000;
    border-radius: 50%;
    animation: vd-subscribe-spin .7s linear infinite;
}
.vd-subscribe-form.is-loading .vd-subscribe-spinner {
    display: inline-block;
}
@keyframes vd-subscribe-spin {
    to { transform: rotate(360deg); }
}

.vd-subscribe-screen-error .vd-subscribe-submit {
    align-self: flex-start;
}

@media screen and (max-width: 767px) {
    .vd-subscribe-popup-container {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 0;
        min-height: 100vh;
    }
    .vd-subscribe-popup-photo-wrap {
        flex: 0 0 220px;
    }
    .vd-subscribe-popup-panel {
        flex: 1 1 auto;
        padding: 36px 24px 40px;
    }
    .vd-subscribe-headline {
        font-size: 21px;
    }
}

/* ---------- Widget ---------- */

.vd-subscribe-widget {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 9995;
    display: none;
}
.vd-subscribe-widget.is-shown {
    display: block;
}
.vd-subscribe-widget-open {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #000000;
    color: #ffffff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
@media screen and (max-width: 767px) {
    .vd-subscribe-widget {
        left: 16px;
        bottom: 16px;
    }
    .vd-subscribe-widget-open {
        width: 48px;
        height: 48px;
    }
}

/* ---------- Footer form ---------- */

.vd-footer-subscribe-wrap .vd-subscribe-form {
    max-width: 420px;
}
.vd-footer-subscribe-wrap .vd-subscribe-input {
    border-color: rgba(0, 0, 0, .3);
    color: var(--main-text);
}
.vd-footer-subscribe-wrap .vd-subscribe-input::placeholder {
    color: rgba(0, 0, 0, .5);
}
.vd-footer-subscribe-wrap .vd-subscribe-field-error {
    color: #c0392b;
}
.vd-footer-subscribe-wrap .vd-subscribe-consent-label,
.vd-footer-subscribe-wrap .vd-subscribe-consent-label a {
    color: var(--main-text);
}
.vd-footer-subscribe-wrap .vd-subscribe-consent-label.is-invalid,
.vd-footer-subscribe-wrap .vd-subscribe-consent-label.is-invalid a {
    color: #c0392b;
}
.vd-footer-subscribe-wrap .vd-subscribe-submit {
    background-color: #000000;
    color: #ffffff;
}
.vd-footer-subscribe-wrap .vd-subscribe-submit:hover {
    background-color: #222222;
}

/* The footer's submit is the small arrow icon inside the input (see
   .vd-create-trigger in styles.css), not the popup's pill button — swap
   the icon for the shared spinner while the request is in flight, so the
   send delay isn't silently invisible to the customer. */
.vd-create-trigger:disabled {
    opacity: .5;
    cursor: default;
}
.vd-subscribe-form.is-loading .vd-create-trigger-icon {
    display: none;
}

/* Success/fail replace the form in place (same .vd-subscribe-screen
   is-active toggle the popup uses), so they need to swap the popup's
   white-on-black text color for the footer's own black-on-white. */
.vd-footer-subscribe-wrap .vd-subscribe-headline {
    color: var(--main-text);
    font-size: 18px;
    margin: 0 0 10px;
}
.vd-footer-subscribe-wrap .vd-subscribe-paragraph {
    color: var(--main-text);
    font-size: 14px;
    margin: 0 0 16px;
}
