/* Sign-up panel (kanban #182): the Subscribe buttons open this instead of
   Portal's signup, with the home hero's four newsletter choices.
   Markup in default.hbs; behaviour in assets/js/ptb-signup.js. */

.ptb-signup {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 440px;
    max-height: calc(100% - 32px);
    margin: auto;
    padding: 28px 24px 20px;
    overflow-y: auto;
    font-family: var(--ptb-sans);
    color: var(--ptb-ink);
    background: var(--ptb-paper, #fff);
    border: 0;
    border-top: 4px solid var(--ptb-pink-text);
    border-radius: 4px;
    /* The wide second shadow dims the page behind the panel even where a
       browser does not paint ::backdrop. */
    box-shadow: 0 12px 40px rgba(21, 23, 26, 0.25), 0 0 0 100vmax rgba(21, 23, 26, 0.55);
}

.ptb-signup::backdrop {
    background: transparent;
}

.ptb-signup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 2.6rem;
    line-height: 1;
    color: var(--ptb-muted);
    background: none;
    border: 0;
    cursor: pointer;
}

.ptb-signup-close:hover {
    color: var(--ptb-ink);
}

.ptb-signup-title {
    margin: 0 32px 6px 0;
    font-family: var(--ptb-serif);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.2;
}

.ptb-signup-lede {
    margin: 0 0 14px;
    font-size: 1.5rem;
    line-height: 1.45;
    color: var(--ptb-muted);
}

.ptb-signup-form {
    margin: 0;
}

.ptb-signup-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.ptb-signup-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ptb-signup-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
}

.ptb-signup-choice input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ptb-pink-text);
}

.ptb-signup-freq {
    color: var(--ptb-muted);
}

.ptb-signup-fields {
    display: flex;
    gap: 8px;
}

.ptb-signup-input {
    flex: 1 1 auto;
}

.ptb-signup-submit {
    flex: none;
    padding: 10px 18px;
    font-size: 1.5rem;
}

.ptb-signup-submit-busy,
.ptb-signup-form.loading .ptb-signup-submit-label {
    display: none;
}

.ptb-signup-form.loading .ptb-signup-submit-busy {
    display: inline;
}

.ptb-signup-msg {
    display: none;
    margin: 10px 0 0;
    font-size: 1.45rem;
    line-height: 1.45;
}

.ptb-signup-form.success .ptb-signup-success {
    display: block;
    color: var(--ptb-ink);
}

.ptb-signup-form.error .ptb-signup-error {
    display: block;
    color: var(--ptb-pink-text);
}

.ptb-signup-form.success .ptb-signup-choices,
.ptb-signup-form.success .ptb-signup-fields {
    display: none;
}

.ptb-signup-signin {
    margin: 14px 0 0;
    font-size: 1.35rem;
    color: var(--ptb-muted);
}

.ptb-signup-signin a {
    color: var(--ptb-pink-text);
    text-decoration: underline;
}

@media (max-width: 479px) {
    .ptb-signup {
        padding: 24px 18px 18px;
    }

    .ptb-signup-fields {
        flex-direction: column;
    }

    .ptb-signup-submit {
        width: 100%;
    }
}
