/* FILE-SUMMARY: Layout of the public Gate page: the sign-in form in front of the door, the fade on entering, the preview marker, the panels' contents and the plain page shown when no Gate scene is published. */

/* The sign-in form lives in the scene's coordinates (1920 × 1080) and scales with it. */
.gate-signin--in-scene {
    position: absolute;
    width: 440px;
    font-size: 24px;
    transform: translate(-50%, -50%);
}

.gate-signin__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
    margin-bottom: 0.4em;
}

.gate-signin__header h2 {
    margin: 0;
    color: var(--dc-wood-dark);
    font-size: 1.25em;
    font-weight: normal;
}

.gate-signin__close {
    width: 1.6em;
    height: 1.6em;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
}

.gate-signin label {
    display: block;
    margin: 0.35em 0 0.15em;
    color: var(--dc-ink-soft);
    font-size: 0.85em;
}

.gate-signin__errors {
    margin: 0.4em 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85em;
}

.gate-signin__errors:empty {
    display: none;
}

.gate-signin__submit {
    margin-top: 0.7em;
    width: 100%;
}

/* Entering: the scene fades to dark before the next page opens. */
.gate-fade {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.gate-fade.is-dark {
    opacity: 1;
    pointer-events: auto;
}

/* Previews (Editors and Administrators) are marked so they aren't mistaken for the published page. */
.gate-preview {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 30;
    padding: 0.2rem 0.6rem;
    border: 1px solid #ffd38a;
    border-radius: 3px;
    background: rgba(120, 20, 10, 0.85);
    color: #fff3dc;
    font: 13px system-ui, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Panel contents */

.gate-panel h3 {
    margin: 1.1em 0 0.3em;
    color: var(--dc-wood);
    font-size: 1.15em;
    font-weight: normal;
}

.gate-panel h3:first-child {
    margin-top: 0;
}

.gate-panel p {
    margin: 0 0 0.6em;
    white-space: pre-line;
    line-height: 1.45;
}

.gate-contacts {
    width: 100%;
    border-collapse: collapse;
}

.gate-contacts th,
.gate-contacts td {
    padding: 0.3em 0.5em;
    border-bottom: 1px solid rgba(107, 70, 38, 0.3);
    text-align: left;
}

.gate-contacts th {
    color: var(--dc-ink-soft);
    font-weight: normal;
    font-size: 0.9em;
}

.gate-languages {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gate-languages li {
    margin: 0.3em 0;
}

.gate-languages a {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 1.25em;
}

.gate-languages a[aria-current="true"] {
    border: 1px solid var(--dc-gold);
    border-radius: 3px;
    text-decoration: none;
}

/* The plain page when no Gate scene is published: the same content, one column. */

body.gate-plain {
    margin: 0;
    min-height: 100%;
    background: var(--dc-wood-dark);
    color: var(--dc-ink);
    font-family: var(--dc-font-theme);
}

.gate-plain__page {
    box-sizing: border-box;
    max-width: 46rem;
    margin: 2rem auto;
    padding: 1.5rem 2rem;
    border: 10px solid var(--dc-wood);
    background: radial-gradient(ellipse at 50% 30%, var(--dc-parchment) 55%, var(--dc-parchment-dark));
}

.gate-plain__page h1 {
    margin-top: 0;
    color: var(--dc-wood-dark);
    font-weight: normal;
}

.gate-plain__page section {
    margin: 1.5rem 0;
}

.gate-plain .gate-signin {
    max-width: 22rem;
}

.gate-plain__disclaimer {
    margin-top: 2rem;
    color: var(--dc-ink-soft);
    font-size: 0.9em;
    white-space: pre-line;
}
