/*
 * Captive portal theme - plain CSS, no build step, no JavaScript dependency.
 * Phone mini-browsers (iOS/Android captive network assistants) are restrictive,
 * so keep this light. Logical properties keep Hebrew (RTL) layouts correct.
 */

:root {
    --bg: #f4f6f8;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --muted: #5b6470;
    --accent: #1379b7;
    --accent-text: #ffffff;
    --border: #d5dae0;
    --error: #b3261e;
    --radius: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

.portal {
    max-inline-size: 480px;
    margin-inline: auto;
    padding: 16px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

h1 {
    margin: 0 0 8px;
    font-size: 22px;
}

p {
    margin: 0 0 12px;
    color: var(--muted);
}

/*
 * Portal page. Each string is shown in Hebrew (right to left) and English,
 * stacked, Hebrew first - like the client's existing form.
 */

.bi-he,
.bi-en {
    display: block;
}

.bi-he {
    text-align: start;
}

.bi-en {
    color: var(--muted);
    font-size: .92em;
}

h1 .bi-en,
h2 .bi-en {
    font-size: .8em;
    font-weight: 400;
}

/* Headings and messages: both languages centred */
.portal-head,
.instruction,
.notice {
    text-align: center;
}

.portal-head .bi-he,
.portal-head .bi-en,
.instruction .bi-he,
.instruction .bi-en,
.notice .bi-he,
.notice .bi-en {
    text-align: center;
}

.intro,
.instruction {
    color: var(--text);
}

.portal-head {
    margin-block-end: 16px;
}

.field {
    margin-block-end: 14px;
}

/* Field labels: English on the left and Hebrew on the right, on one line */
.field label {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-block-end: 4px;
}

.field label .bi-he {
    font-weight: 600;
}

.field label .bi-en {
    font-weight: 400;
}

.req {
    color: var(--error);
}

input[type="text"],
input[type="tel"],
input[type="email"] {
    inline-size: 100%;
    padding: 12px;
    font: inherit;          /* 16px+ stops iOS zooming the page on focus */
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.has-error input[type="text"],
.has-error input[type="tel"],
.has-error input[type="email"] {
    border-color: var(--error);
}

.error {
    margin: 4px 0 0;
    color: var(--error);
    font-size: .9em;
}

.error .bi-en {
    color: var(--error);
}

.check {
    margin-block-end: 12px;
}

.check label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: .92em;
}

.check input[type="checkbox"] {
    flex: none;
    inline-size: 20px;
    block-size: 20px;
    margin-block-start: 2px;
}

.check.has-error label {
    color: var(--error);
}

.button {
    display: block;
    inline-size: 100%;
    margin-block-start: 8px;
    padding: 14px;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--accent-text);
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.button .bi-he,
.button .bi-en {
    text-align: center;
}

.button .bi-en {
    color: var(--accent-text);
    opacity: .85;
}

.notice {
    text-align: center;
}

.notice-ok h2 {
    color: #1b7a3d;
}

.notice-error h2 {
    color: var(--error);
}

/* Honeypot: kept out of sight, but still in the page for bots to find */
.hp {
    position: absolute;
    inset-inline-start: -10000px;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
}

.logo {
    margin: 0 0 12px;
}

.logo img {
    display: block;
    max-inline-size: 100%;
    max-block-size: 120px;
    margin-inline: auto;
}
