/*
 * Morocco Secrets — the sign-in screen every door shares (2026-10-01)
 * Markup and photographs: include/signin-screen.php. The look is the partner
 * portal's (partner/assets/portal.css, section 7): a photograph of Morocco with
 * one line about the door, and the form on calm paper beside it. Logical
 * properties throughout: the traveller pages are also served in Arabic.
 *
 * The website's identity since 2026-10-28: ivory paper, the green for titles and the photograph's shade, the brass
 * button with charcoal words. The colours and the two faces come from config/theme.json ("signin"), printed after
 * this sheet by include/signin-screen.php; the values below are the fallback, the same as the file ships.
 */

.si-body {
  --paper: #F7F4ED; --paper-2: color-mix(in srgb, var(--paper) 45%, #fff); --surface: #FFFFFF;
  --sand-2: color-mix(in srgb, var(--si-brass) 8%, var(--paper)); --hairline: #E3DCCD; --line-strong: color-mix(in srgb, var(--si-brass) 30%, var(--hairline));
  --ink: #163027; --ink-2: #3F4B44; --stone: #676255; --stone-2: color-mix(in srgb, var(--stone) 60%, var(--paper));
  --bronze: #87692F;
  --si-brass: #C4A260; --si-brass-hover: #A89057; --si-on-brass: #163027;   /* the button: charcoal on the gold, 5.84:1 */
  --si-title: #195042; --si-shade: #12352C;                                    /* titles; the photograph's shade */
  --ok: #4E6B3B; --ok-soft: #E8EEE1; --ok-line: #C6D3BA;
  --warn: #9A5F0E; --warn-soft: #F7ECD8; --warn-line: #E6CFA5;
  --bad: #9A2F2A; --bad-soft: #F5E3E1; --bad-line: #E3BDB9;
  --info: #3E5C76; --info-soft: #E4EAF0; --info-line: #C3D0DC;
  --wa: #12805C;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 4px;   /* every control, the website's corner (owner, 2026-10-21: no pills) */
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
  margin: 0; min-height: 100vh;
  font: 400 15px/1.6 var(--font-ui); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
/* Arabic: Playfair Display and Inter carry no Arabic letters; css/rtl.css loads Cairo and Tajawal on these pages */
[dir="rtl"] .si-body {
  --font-display: var(--font-rtl-heading, 'Cairo'), 'Segoe UI', Tahoma, sans-serif;
  --font-ui: var(--font-rtl-body, 'Tajawal'), 'Segoe UI', Tahoma, sans-serif;
}
[dir="rtl"] .si-eyebrow, [dir="rtl"] .si-brand span { letter-spacing: 0; }
.si-body *, .si-body *::before, .si-body *::after { box-sizing: border-box; }
.si-body a { color: var(--ink-2); text-decoration: none; }   /* no line under a link (owner, 2026-10-21) */
.si-body a:hover { color: var(--bronze); }
.si-body :focus-visible { outline: 2px solid var(--si-title); outline-offset: 2px; }

.si { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); }

/* the photograph */
.si-art {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px;
  /* the colour belongs to the last layer only; written first, it voids the whole declaration */
  background: linear-gradient(180deg, color-mix(in srgb, var(--si-shade) 8%, transparent) 0%, color-mix(in srgb, var(--si-shade) 38%, transparent) 45%, color-mix(in srgb, var(--si-shade) 86%, transparent) 100%), var(--si-img, none) center / cover no-repeat var(--si-shade);
  color: #fff;
}
.si-eyebrow { font-size: 11px; line-height: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: rgba(255,255,255,.75); }
.si-art h2 { margin: 10px 0 0; font: 400 38px/44px var(--font-display); letter-spacing: -.02em; color: #fff; max-width: 15ch; }
.si-art p { margin: 14px 0 0; color: rgba(255,255,255,.82); max-width: 44ch; }

/* the form */
.si-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 64px); background: var(--paper); }
.si-brand { display: block; padding: 0 0 28px; text-decoration: none; color: var(--si-title) !important; }
.si-brand b { display: block; font: 500 20px/1.15 var(--font-display); letter-spacing: -.01em; }
.si-brand span { display: block; margin-top: 4px; font-size: 11px; line-height: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); }
.si-panel h1 { margin: 0 0 6px; font: 400 30px/36px var(--font-display); letter-spacing: -.015em; color: var(--si-title); }
.si-lede { margin: 0 0 28px; color: var(--ink-2); }
.si-field { margin-bottom: 16px; }
.si-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.si-panel input[type=text], .si-panel input[type=email], .si-panel input[type=password], .si-panel input[type=tel] {
  width: 100%; padding: 10px 12px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius); font: 400 15px/22px var(--font-ui);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.si-panel input:focus { outline: none; border-color: var(--si-title); box-shadow: 0 0 0 3px color-mix(in srgb, var(--si-brass) 30%, transparent); }
.si-panel input::placeholder { color: var(--stone-2); }
.si-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; letter-spacing: .06em; }
.si-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-size: 24px !important; line-height: 32px !important; letter-spacing: .38em; text-align: center; }
.si-pass { position: relative; }
.si-pass input { padding-inline-end: 64px !important; }
.si-pass button {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--ink-2); font: 500 12px var(--font-ui); padding: 6px 8px; cursor: pointer; border-radius: var(--radius);
}
.si-pass button:hover { background: var(--sand-2); }
.si-check { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-size: 14px; color: var(--ink-2); }
.si-check input { inline-size: 16px; block-size: 16px; margin: 0; accent-color: var(--si-title); cursor: pointer; }
.si-check label { cursor: pointer; }
.si-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 12px 16px; margin-top: 6px; border: 1px solid var(--si-brass); border-radius: var(--radius);
  background: var(--si-brass); color: var(--si-on-brass); font: 600 15px/22px var(--font-ui); cursor: pointer; text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.si-btn:hover { background: var(--si-brass-hover); border-color: var(--si-brass-hover); color: var(--si-on-brass) !important; }
.si-btn.is-quiet { background: transparent; color: var(--ink-2) !important; border-color: var(--line-strong); }
.si-btn.is-quiet:hover { background: var(--sand-2); color: var(--ink) !important; }
.si-btn.is-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.si-btn.is-wa:hover { background: color-mix(in srgb, var(--wa) 85%, #000); border-color: color-mix(in srgb, var(--wa) 85%, #000); color: #fff !important; }
.si-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.si-links { margin-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--stone); }
.si-note { margin: 16px 0 0; font-size: 13px; line-height: 1.55; color: var(--stone); }
.si-bad { color: var(--bad); }
.si-foot { margin-top: 36px; font-size: 12px; color: var(--stone); }
.si-flash { padding: 12px 16px; margin-bottom: 24px; border-radius: var(--radius); font-size: 14px; border: 1px solid; }
.si-flash.is-error   { background: var(--bad-soft);  border-color: var(--bad-line);  color: var(--bad); }
.si-flash.is-success { background: var(--ok-soft);  border-color: var(--ok-line);   color: var(--ok); }
.si-flash.is-info    { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.si-flash.is-warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
/* the admin's flash messages, drawn by renderFlashMessages() */
.si-panel .alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 24px; border-radius: var(--radius); font-size: 14px; border: 1px solid var(--info-line); background: var(--info-soft); color: var(--info); }
.si-panel .alert-error   { background: var(--bad-soft);  border-color: var(--bad-line);  color: var(--bad); }
.si-panel .alert-success { background: var(--ok-soft);   border-color: var(--ok-line);   color: var(--ok); }
.si-panel .alert-warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.si-panel .alert span { flex: 1; }
.si-panel .alert .alert-close { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.si-panel .alert i { display: none; }

@media (max-width: 900px) {
  .si { grid-template-columns: 1fr; }
  .si-art { min-height: 220px; padding: 28px 20px; }
  .si-art h2 { font-size: 28px; line-height: 34px; }
  .si-panel { justify-content: flex-start; padding: 32px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) { .si-body * { transition: none !important; } }
