/* Arab Arc cookie consent banner (replaces Cookiebot). Logical properties, so one file serves LTR and RTL.
   Design rules (see docs/cookie-consent.md): non-modal card, Reject and Accept look identical, 44px targets,
   AA contrast, no layout shift (position: fixed), motion off for prefers-reduced-motion. */
.arc-consent {
  --arc-c-bg: #ffffff;
  --arc-c-text: #212121;
  --arc-c-muted: #4a5468;
  --arc-c-brand: #133d59;
  --arc-c-line: #d9dee7;
  position: fixed;
  inset-block-end: 16px;
  inset-inline-start: 16px;
  z-index: 10000;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 20px;
  color: var(--arc-c-text);
  background: var(--arc-c-bg);
  border: 1px solid var(--arc-c-line);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(19, 61, 89, .22);
  font-size: 15px;
  line-height: 1.55;
  text-align: start;
  animation: arc-consent-in .22s ease-out;
}
.arc-consent[hidden],
.arc-consent [hidden] { display: none !important; }
.arc-consent *,
.arc-consent *::before,
.arc-consent *::after { box-sizing: border-box; }

.arc-consent__title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--arc-c-brand);
}
.arc-consent__title:focus { outline: none; }
.arc-consent p { margin: 0 0 12px; color: var(--arc-c-muted); font-size: 15px; }
.arc-consent a { color: var(--arc-c-brand); text-decoration: underline; text-underline-offset: 2px; }

.arc-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 14px;
}
.arc-consent__btn {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--arc-c-brand);
  border: 2px solid var(--arc-c-brand);
  border-radius: 8px;
  cursor: pointer;
}
.arc-consent__btn:hover { background: #0d2c42; border-color: #0d2c42; }
/* Outline variant: used for the secondary row of the settings layer; Reject and Accept always share one style */
.arc-consent__btn--outline { color: var(--arc-c-brand); background: #ffffff; }
.arc-consent__btn--outline:hover { color: #ffffff; }
.arc-consent__btn--link {
  flex: 1 1 100%;
  min-height: 44px;
  color: var(--arc-c-brand);
  background: none;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.arc-consent__btn--link:hover { color: #0d2c42; background: #f1f4f8; border-color: transparent; }
.arc-consent button:focus-visible,
.arc-consent a:focus-visible,
.arc-consent summary:focus-visible,
.arc-consent input:focus-visible + .arc-consent__track {
  outline: 3px solid var(--arc-c-brand);
  outline-offset: 2px;
}

.arc-consent__cat {
  margin-block: 12px 0;
  padding: 12px 14px;
  background: #f6f8fb;
  border: 1px solid var(--arc-c-line);
  border-radius: 10px;
}
.arc-consent__cat p { margin: 6px 0 8px; font-size: 14px; }
.arc-consent__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.arc-consent__cat-name { font-weight: 700; color: var(--arc-c-text); }
.arc-consent__badge {
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--arc-c-brand);
  background: #e3ebf3;
  border-radius: 999px;
  white-space: nowrap;
}

/* switch: a real checkbox (role=switch) so it works with keyboard and screen readers */
.arc-consent__switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.arc-consent__switch input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.arc-consent__track {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  background: #6b7589;
  border-radius: 999px;
  transition: background .15s;
}
.arc-consent__track::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  transition: inset-inline-start .15s;
}
.arc-consent__switch input:checked + .arc-consent__track { background: var(--arc-c-brand); }
.arc-consent__switch input:checked + .arc-consent__track::after { inset-inline-start: 23px; }
.arc-consent__switch { position: relative; }
.arc-consent__switch .arc-consent__cat-name { order: -1; }

.arc-consent details { margin-block-start: 4px; }
.arc-consent summary { min-height: 28px; font-size: 14px; font-weight: 600; color: var(--arc-c-brand); cursor: pointer; }
.arc-consent table { width: 100%; margin-block-start: 8px; border-collapse: collapse; font-size: 13px; }
.arc-consent th,
.arc-consent td { padding: 6px 8px; text-align: start; vertical-align: top; border-block-start: 1px solid var(--arc-c-line); color: var(--arc-c-muted); }
.arc-consent th { color: var(--arc-c-text); font-weight: 600; }
.arc-consent td:first-child { word-break: break-word; }

@media (max-width: 575.98px) {
  .arc-consent {
    inset-block-end: 8px;
    inset-inline: 8px;
    width: auto;
    max-height: 82vh;
    padding: 16px;
  }
  .arc-consent p { font-size: 14px; margin-bottom: 8px; }
  .arc-consent__title { font-size: 17px; }
  .arc-consent__actions { margin-block-start: 10px; }
  .arc-consent__btn { min-width: 0; flex: 1 1 calc(50% - 5px); }
}
@keyframes arc-consent-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .arc-consent { animation: none; }
  .arc-consent__track, .arc-consent__track::after { transition: none; }
}
@media (forced-colors: active) {
  .arc-consent { border: 2px solid CanvasText; }
  .arc-consent__track { border: 2px solid ButtonText; }
}

/* Legal pages (privacy policy, terms) */
.legal-content { max-width: 880px; margin-inline: auto; font-size: 16px; line-height: 1.75; }
.legal-content h2 { margin: 32px 0 10px; font-size: 24px; }
.legal-content h3 { margin: 22px 0 8px; font-size: 19px; }
.legal-content p, .legal-content li { color: #3d4658; }
.legal-content ul { padding-inline-start: 22px; list-style: disc; }
.legal-content .legal-updated { margin-bottom: 20px; font-size: 14px; color: #5f6980; }
.legal-content .table { font-size: 15px; }
.legal-content .table th, .legal-content .table td { vertical-align: top; text-align: start; }
.legal-content .cookie-settings-btn { color: #133d59; text-decoration: underline; }

/* Click-to-load map placeholder (same 450px height as the iframe, so no layout shift) */
.contact-map-consent { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 450px; padding: 24px; text-align: center; background: #eef2f6; }
.contact-map-consent p { max-width: 520px; margin: 0; color: #3d4658; }

/* One-line privacy notice under the enquiry forms */
.form-privacy-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; opacity: .9; }
.form-privacy-note a { color: inherit; text-decoration: underline; }
/* The home quote form sits on a dark navy panel */
.appointment .form-privacy-note, .appointment-form .form-privacy-note { color: #e6edf4; opacity: 1; }

.legal-hero .breadcrumb-menu li.active { color: #eeb01d !important; }
