/* ABOUTME: Styles for the signed-out Hub save/follow email popup.
ABOUTME: Desktop is a centered 630px card; phone is a bottom sheet. */

.hub-email-popup {
    position: fixed;
    inset: 0;
    /* Above the map/stacking-plan drawer (9999), whose hearts open this popup. */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-email-popup[hidden] {
    display: none;
}

.hub-email-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 29, 36, 0.45);
}

.hub-email-popup__card {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: 630px;
    min-height: 422px;
    max-width: calc(100vw - 32px);
    max-height: min(92vh, 640px);
    overflow-y: auto;
    padding: 40px 28px 28px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(24, 29, 36, 0.18);
}

.hub-email-popup__close {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hoa-dark-blue);
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.hub-email-popup__close:hover {
    opacity: 0.7;
}

.hub-email-popup__title {
    margin: 0 auto 10px;
    max-width: 575px;
    font-family: 'Rufina', serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 41px;
    text-align: center;
    color: var(--hoa-rust);
}

.hub-email-popup__body {
    margin: 0 auto 28px;
    max-width: 480px;
    font-family: Rawline, Raleway, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    color: var(--hoa-dark-blue);
}

.hub-email-popup__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 317px;
    max-width: 100%;
    margin: 0 auto;
}

.hub-email-popup__google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 316px;
    max-width: 100%;
    height: 40px;
    padding: 0 16px;
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: var(--hoa-dark-blue);
    background: #fff;
    border: 1px solid var(--hoa-light-grey);
    border-radius: 10px;
    cursor: pointer;
}

.hub-email-popup__google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hub-email-popup__or {
    margin: 10px 0;
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hoa-medium-grey);
}

.hub-email-popup__form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.hub-email-popup__honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hub-email-popup__email {
    width: 316px;
    max-width: 100%;
    height: 40px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: var(--hoa-dark-blue);
    background: #fff;
    border: 1px solid var(--hoa-light-grey);
    border-radius: 10px;
}

.hub-email-popup__email::placeholder {
    color: var(--hoa-medium-grey);
}

.hub-email-popup__email:focus {
    outline: none;
    border-color: var(--hoa-rust);
}

.hub-email-popup__error {
    margin: 8px 0 0;
    font-family: Rawline, Raleway, sans-serif;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    color: #ff0d47;
}

.hub-email-popup__error[hidden] {
    display: none;
}

.hub-email-popup__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 317px;
    max-width: 100%;
    height: 48px;
    margin: 12px auto 0;
    padding: 12px 16px;
    gap: 8px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
    background: var(--hoa-rust);
    border: 0;
    border-radius: 10px;
    border-top-left-radius: 0;
    cursor: pointer;
}

.hub-email-popup__submit:hover:not(:disabled) {
    background: #b45d45;
    color: #fff;
}

.hub-email-popup__submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.hub-email-popup__legal {
    margin: 16px 0 0;
    max-width: 480px;
    font-family: Rawline, Raleway, sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    color: var(--hoa-dark-blue);
}

.hub-email-popup__legal a {
    color: var(--hoa-dark-blue) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.hub-email-popup__sent {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hub-email-popup__sent-text {
    margin: 24px auto 40px;
    max-width: 480px;
    font-family: Rawline, Raleway, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 21px;
    text-align: center;
    color: var(--hoa-dark-blue);
}

.hub-email-popup__sent-email {
    display: block;
    font-weight: 600;
}

.hub-email-popup__prompt {
    margin: 0 0 12px;
    width: 317px;
    max-width: 100%;
    font-family: Rawline, Raleway, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    text-align: center;
    color: var(--hoa-dark-blue);
}

.hub-email-popup__change {
    display: block;
    width: 317px;
    max-width: 100%;
    margin: 16px 0 0;
    font-family: Rawline, Raleway, sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 17px;
    text-align: center;
    color: var(--hoa-rust) !important;
    text-decoration: underline !important;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.hub-email-popup__change:hover {
    opacity: 0.85;
}

@media (max-width: 640px) {
    .hub-email-popup {
        align-items: flex-end;
    }

    .hub-email-popup__card {
        width: 100%;
        max-width: 100%;
        min-height: 476px;
        max-height: 90vh;
        padding: 36px 24px 28px;
        border-radius: 16px 16px 0 0;
    }

    .hub-email-popup__title {
        font-size: 32px;
        line-height: 36px;
        max-width: none;
    }

    .hub-email-popup__body {
        margin-bottom: 24px;
    }
}
