/*
Theme Name: Yalla 2026 TEST BUILD — delete after testing
Theme URI: https://yallafoundation.nl
Author: Stichting Yalla Foundation
Author URI: https://yallafoundation.nl
Description: FOR yallafoundation.nl ONLY — refuses to activate on other domains and reverts to your previous theme. Child theme of Twenty Twenty-Five. Palette taken from the Yalla wordmark (charcoal and aubergine) with clay for actions. Multilingual and RTL-ready for Dutch, English and Arabic. Includes an agenda post type, a "what do you need?" router, and privacy hardening for a site holding member records.
Template: twentytwentyfive
Version: 2.2.1-test
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yalla-2026
Tags: block-patterns, block-styles, full-site-editing, accessibility-ready, rtl-language-support, translation-ready, custom-colors, custom-logo, custom-menu
*/

/* ---------------------------------------------------------------------------
   Yalla 2026

   Design lives in theme.json. This file holds only what theme.json cannot
   express. Everything uses CSS LOGICAL PROPERTIES (inline-start / inline-end)
   so the Arabic RTL site mirrors automatically — never left/right.
   --------------------------------------------------------------------------- */

:root{
  --yalla-line: #E2DAD4;
  --yalla-line-strong: #CFC4BC;
  --yalla-error: #8F1F1F;
  --yalla-radius: 8px;
}

/* --- Block styles ---------------------------------------------------------- */

/* Interlock: the nesting right angle from the YALLA wordmark. Opt-in accent. */
.is-style-yalla-interlock{ position: relative; }
.is-style-yalla-interlock::before{
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 22px; height: 22px;
  border-block-start: 3px solid var(--wp--preset--color--clay);
  border-inline-start: 3px solid var(--wp--preset--color--clay);
  pointer-events: none;
}

.is-style-yalla-card{
  background: var(--wp--preset--color--base);
  border: 1px solid var(--yalla-line);
  border-radius: var(--yalla-radius);
}

.is-style-yalla-accent-bar{
  border-inline-start: 4px solid var(--wp--preset--color--clay);
  padding-inline-start: var(--wp--preset--spacing--40);
  border-radius: 0;
}

/* --- Accessibility -------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible{
  outline: 3px solid var(--wp--preset--color--clay);
  outline-offset: 3px;
}
.skip-link:focus{
  background: var(--wp--preset--color--base) !important;
  color: var(--wp--preset--color--plum) !important;
}
.yalla-sr{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap;
}

/* --- Language switcher (Polylang) ----------------------------------------- */

.yalla-langs, .pll-parent-menu-item ul{ list-style:none; margin:0; padding:0; }
.yalla-langs{ display:flex; gap:.35rem; }
.yalla-langs a{
  text-decoration:none; padding:.15rem .4rem; border-radius:4px;
  font-size:.9rem; color: var(--wp--preset--color--text-soft);
}
.yalla-langs .current-lang > a, .yalla-langs a[aria-current]{
  background: var(--wp--preset--color--plum);
  color: var(--wp--preset--color--base);
  font-weight:600;
}

/* Beiruti covers Arabic and Latin, so headings need no override.
   Body copy falls back to Beiruti in Arabic — Fira Sans has thin coverage. */
:root:lang(ar) body, [dir="rtl"] body{
  font-family: var(--wp--preset--font-family--beiruti);
}

/* --- Tables (jaarrekening and data pages) --------------------------------- */

.wp-block-table table{ border-collapse: collapse; }
.wp-block-table th{
  background: var(--wp--preset--color--surface);
  text-align: start; font-weight: 600;
}
.wp-block-table th, .wp-block-table td{
  border: 1px solid var(--yalla-line); padding: .6rem .8rem;
}

/* --- Forms: Contact Form 7 and User Registration inherit almost nothing --- */

.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"],
.wpcf7 textarea, .wpcf7 select,
.ur-frontend-form input[type="text"], .ur-frontend-form input[type="email"],
.ur-frontend-form input[type="password"], .ur-frontend-form input[type="tel"],
.ur-frontend-form textarea, .ur-frontend-form select{
  width:100%; padding:.7rem .85rem;
  border:2px solid var(--yalla-line-strong); border-radius:5px;
  background: var(--wp--preset--color--surface);
  font-family:inherit; font-size:1rem;
  color: var(--wp--preset--color--contrast);
}
.wpcf7 label, .ur-frontend-form label{ font-weight:600; font-size:.93rem; display:block; }
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus,
.ur-frontend-form input:focus, .ur-frontend-form textarea:focus{
  background: var(--wp--preset--color--base);
}
.wpcf7-not-valid-tip, .ur-error, .ur-message.error{
  color: var(--yalla-error); font-weight:500; font-size:.87rem;
}
.wpcf7-spinner{ margin-inline-start:.5rem; }

/* Members area: keep it plain and legible, never decorative */
.ur-frontend-form{
  background: var(--wp--preset--color--base);
  border:1px solid var(--yalla-line); border-radius:10px;
  padding: var(--wp--preset--spacing--40);
}
.ur-submit-button, .wpcf7-submit{
  background: var(--wp--preset--color--clay);
  color: var(--wp--preset--color--base);
  border:2px solid var(--wp--preset--color--clay);
  border-radius:5px; padding:.85rem 1.5rem;
  font-weight:600; font-size:1.02rem; cursor:pointer;
}
.ur-submit-button:hover, .wpcf7-submit:hover{
  background: var(--wp--preset--color--clay-dark);
  border-color: var(--wp--preset--color--clay-dark);
}

/* --- Links on dark sections ------------------------------------------------
   theme.json sets one global link colour (plum). On the plum, plum-deep and
   charcoal sections that colour is almost invisible — the jaarrekening links
   and the whole footer navigation were effectively unreadable. Found by
   looking at screenshots; no amount of markup checking would have shown it.
   White on those three backgrounds measures 10.6:1, 14.4:1 and 15.9:1.       */

.has-plum-background-color :where(a:not(.wp-element-button)),
.has-plum-deep-background-color :where(a:not(.wp-element-button)),
.has-charcoal-background-color :where(a:not(.wp-element-button)){
  color: var(--wp--preset--color--base);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.has-plum-background-color :where(a:not(.wp-element-button)):hover,
.has-plum-deep-background-color :where(a:not(.wp-element-button)):hover,
.has-charcoal-background-color :where(a:not(.wp-element-button)):hover{
  color: var(--wp--preset--color--surface);
  text-decoration-thickness: 2px;
}

/* --- Card columns: keep the call to action on the baseline -----------------
   Cards in a row have different amounts of text, so the "→" link sat at a
   different height in each one. Push the last child to the bottom.           */

.wp-block-column.is-style-yalla-card{
  display: flex;
  flex-direction: column;
}
.wp-block-column.is-style-yalla-card > :last-child{
  margin-block-start: auto;
  margin-block-end: 0;
}

/* --- Image placeholders ----------------------------------------------------
   Patterns ship with an empty <img> so you can drop your own photo in. An
   image with no src collapses to nothing, which left a large empty column and
   made the layout look broken before any content was added. Show a deliberate
   placeholder block instead; it disappears the moment a real image is set.   */

.wp-block-image img:not([src]),
.wp-block-image img[src=""]{
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--wp--preset--color--plum);
  border-radius: 8px;
}
@media (max-width: 820px){
  .wp-block-image img:not([src]),
  .wp-block-image img[src=""]{ aspect-ratio: 16 / 10; }
}

/* --- Fixed, transparent header ---------------------------------------------
   Sticky, and transparent while the visitor is at the top so it sits over the
   video and hero. assets/js/header.js sets the solid background inline once the
   page is scrolled — a class-based rule did not survive the block theme's
   cascade, and a permanently transparent bar over body text is unreadable.   */

.wp-site-blocks > header{
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background-color: transparent;
  border-block-end: 1px solid transparent;
  transition: background-color .18s ease, border-color .18s ease;
}
@media (prefers-reduced-motion: reduce){
  .wp-site-blocks > header{ transition: none; }
}
/* No JavaScript: keep the bar readable rather than transparent. */
.no-js .wp-site-blocks > header{
  background-color: var(--wp--preset--color--canvas);
  border-block-end-color: var(--yalla-line, #E2DAD4);
}

/* --- Video section --------------------------------------------------------- */

.yalla-video{ margin: 0; }
.yalla-video video{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: var(--wp--preset--color--plum);
}
.yalla-video figcaption{
  font-size: .82rem;
  color: var(--wp--preset--color--text-soft);
  margin-block-start: .6rem;
}
.yalla-video figcaption a{ color: inherit; }

/* --- Reduced motion and print --------------------------------------------- */

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.001ms !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}
@media print{
  header, footer, .wp-block-navigation, .yalla-langs,
  .yalla-router, .yalla-agenda__filters{ display:none !important; }
  body{ background:#fff; color:#000; font-size:11pt; }
  a[href^="http"]::after{ content:" (" attr(href) ")"; font-size:9pt; }
}
