/* Progressive global contact dialog for journals.cl. */
.contact-modal {
    background: var(--editorial-paper, #fbfaf7);
    border: 1px solid var(--editorial-line, #d7dde5);
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--editorial-ink, #18283d);
    height: min(880px, calc(100dvh - 3rem));
    margin: auto;
    max-height: calc(100dvh - 3rem);
    max-width: 960px;
    overflow: hidden;
    padding: 0;
    width: calc(100% - 3rem);
}

.contact-modal:not([open]) {
    display: none;
}

.contact-modal::backdrop {
    background: rgba(7, 20, 36, 0.76);
}

html.contact-modal-open,
html.contact-modal-open body {
    overflow: hidden;
    overscroll-behavior: none;
}

.contact-modal__shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.contact-modal__header {
    align-items: flex-start;
    background: #f7f8fa;
    border-bottom: 1px solid var(--editorial-line, #d7dde5);
    display: flex;
    flex: none;
    gap: 2rem;
    justify-content: space-between;
    padding: 1.55rem 1.75rem 1.35rem;
}

.contact-modal__eyebrow {
    color: var(--editorial-blue, #1f5187);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0 0 0.45rem;
}

.contact-modal__header h2 {
    color: var(--editorial-blue-deep, #142b47);
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 1.08;
    margin: 0;
}

.contact-modal__header p:last-child {
    color: var(--editorial-muted, #5d6875);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0.55rem 0 0;
    max-width: 43rem;
}

.site-editorial .contact-modal .contact-modal__close {
    align-items: center;
    background: transparent !important;
    border: 1px solid var(--editorial-line, #c9d1dc) !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    color: var(--editorial-blue-deep, #142b47) !important;
    cursor: pointer;
    display: inline-flex;
    flex: none;
    font-family: "Manrope", Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 750;
    gap: 0.4rem;
    line-height: 1;
    padding: 0.55rem 0.65rem !important;
}

.site-editorial .contact-modal .contact-modal__close:hover,
.site-editorial .contact-modal .contact-modal__close:focus {
    background: #ffffff !important;
    border-color: var(--editorial-blue, #1f5187) !important;
    color: var(--editorial-blue-deep, #142b47) !important;
}

.site-editorial .contact-modal .contact-modal__close:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.contact-modal__close span:first-child {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 0.7;
}

.contact-modal__status {
    background: #eef4f9;
    border-bottom: 1px solid var(--editorial-line, #d7dde5);
    color: var(--editorial-blue-deep, #142b47);
    flex: none;
    font-family: "Manrope", Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    padding: 0.65rem 1.75rem;
}

.contact-modal__status:empty {
    display: none;
}

.contact-modal__status.is-error {
    background: #fff4f2;
    color: #8a231f;
}

.contact-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.55rem 1.75rem 1.8rem;
    scrollbar-gutter: stable;
}

.contact-modal__body[aria-busy="true"] {
    cursor: progress;
}

.contact-modal .contact-form-wrap h2 {
    color: var(--editorial-blue-deep, #142b47);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.42rem;
    line-height: 1.2;
    margin: 0 0 0.25rem;
}

.contact-modal .contact-required {
    color: var(--editorial-muted, #5d6875);
    font-size: 0.9rem;
    margin: 0 0 1.2rem;
}

.contact-modal .contact-form {
    display: grid;
    gap: 1rem 1.2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-modal .contact-form__field--service,
.contact-modal .contact-form__field--message,
.contact-modal .contact-honeypot,
.contact-modal .contact-privacy,
.contact-modal .form-actions {
    grid-column: 1 / -1;
}

.contact-modal .form-row {
    align-content: start;
    gap: 0.42rem;
}

.contact-modal .form-row label {
    color: var(--editorial-blue-deep, #142b47);
    font-family: "Manrope", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 750;
}

.contact-modal .field-help {
    color: var(--editorial-muted, #5d6875);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: -0.05rem 0 0.1rem;
}

.contact-modal .form-row input,
.contact-modal .form-row select,
.contact-modal .form-row textarea {
    box-sizing: border-box;
    width: 100%;
}

.contact-modal .form-row textarea {
    min-height: 132px;
}

.contact-modal .contact-honeypot {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

.contact-modal .contact-privacy {
    color: var(--editorial-muted, #5d6875);
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0.05rem 0 0;
}

.contact-modal .form-actions {
    margin-top: 0.1rem;
}

.contact-modal .form-actions button {
    min-height: 46px;
    width: 100%;
}

.contact-modal .form-actions button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.contact-modal .form-error {
    background: #fff4f2;
    border-left: 3px solid #a8342d;
    color: #7e211c;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;
}

.contact-modal .form-error .errorlist {
    margin: 0;
}

.contact-modal .errorlist {
    color: #9b1c1c;
    font-size: 0.84rem;
    line-height: 1.45;
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
}

.contact-modal [aria-invalid="true"] {
    border-color: #a8342d !important;
}

.contact-modal__loading {
    border-top: 1px solid var(--editorial-line, #d7dde5);
    color: var(--editorial-muted, #5d6875);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 1.25rem 0 0;
}

.contact-modal__fallback {
    border-left: 3px solid #a8342d;
    padding: 0.2rem 0 0.2rem 1rem;
}

.contact-modal__fallback h3 {
    color: var(--editorial-blue-deep, #142b47);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.contact-modal__fallback p {
    color: var(--editorial-muted, #5d6875);
    line-height: 1.6;
    margin: 0;
}

.contact-modal__fallback a,
.contact-modal .contact-success a {
    color: var(--editorial-blue, #1f5187);
    font-weight: 750;
}

.contact-modal .contact-success {
    border-top: 1px solid var(--editorial-line, #d7dde5);
    padding-top: 1.35rem;
}

.contact-modal .contact-success:focus {
    outline: none;
}

.contact-modal .contact-success:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 4px;
}

.contact-modal .contact-success h2 {
    color: var(--editorial-blue-deep, #142b47);
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.12;
    margin: 0 0 1rem;
}

.contact-modal .contact-success p {
    color: var(--editorial-muted, #5d6875);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.65;
    margin: 0 0 0.8rem;
    max-width: 48rem;
}

@media (max-width: 700px) {
    .contact-modal {
        height: calc(100dvh - 0.75rem);
        max-height: calc(100dvh - 0.75rem);
        max-width: none;
        width: calc(100% - 0.75rem);
    }

    .contact-modal__header {
        gap: 0.75rem;
        padding: 1rem 1rem 0.9rem;
    }

    .contact-modal__header h2 {
        font-size: 1.65rem;
    }

    .contact-modal__header p:last-child {
        display: none;
    }

    .site-editorial .contact-modal .contact-modal__close {
        padding: 0.5rem !important;
    }

    .contact-modal__close span:last-child {
        height: 1px;
        overflow: hidden;
        position: absolute;
        width: 1px;
    }

    .contact-modal__status {
        padding: 0.6rem 1rem;
    }

    .contact-modal__body {
        padding: 1rem 1rem 1.4rem;
        scrollbar-gutter: auto;
    }

    .contact-modal .contact-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-modal .contact-form__field,
    .contact-modal .contact-honeypot,
    .contact-modal .contact-privacy,
    .contact-modal .form-actions {
        grid-column: 1;
    }

    .contact-modal .form-row input,
    .contact-modal .form-row select,
    .contact-modal .form-row textarea {
        font-size: 16px;
    }
}
