/*
Theme Name: Plumber Portal Theme
Theme URI: https://plumber.2il.co
Author: Plumber Portal Team
Description: Lightweight, cache-friendly theme built for Plumber Portal Core.
Version: 1.1.1
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.2
License: GPLv2 or later
Text Domain: plumber-portal-theme
*/

/* ========= 1) Base Reset (safe, accessibility friendly) ========= */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Noto Sans", Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: #0f172a;            /* slate-900 */
  background: #ffffff;
}
img, video, canvas, svg { display: block; max-inline-size: 100%; block-size: auto; }
img { height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
a { color: #0ea5e9; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus { outline: 2px solid #0ea5e9; outline-offset: 2px; }
::selection { background: #bae6fd; color: #0f172a; }

/* Logical flow for RTL/LTR */
html[dir="rtl"] body { direction: rtl; }
main { display: block; }

/* ========= 2) Layout ========= */
.container {
  max-inline-size: 1080px;
  margin-inline: auto;
  padding-inline: 1rem;
}
.site-header,
.site-footer {
  border-block: 1px solid #e5e7eb;     /* gray-200 */
  background: #fff;
}
.brand {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

/* ========= 3) Typography ========= */
:root{
  --ppt-primary: #0ea5e9;
  --ppt-text: #0f172a;
  --ppt-muted: #64748b;     /* slate-500 */
  --ppt-border:#e5e7eb;     /* gray-200 */
  --ppt-bg-soft:#f8fafc;    /* slate-50 */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
}
body { font-size: var(--step-0); }
p { margin-block: 0.75rem 1rem; }
h1,h2,h3,h4,h5,h6 {
  margin-block: 1.2rem 0.6rem;
  font-weight: 800;
  line-height: 1.25;
}
h1 { font-size: clamp(1.75rem, 2.2vw + 1rem, 2.25rem); }
h2 { font-size: clamp(1.4rem, 1.6vw + 1rem, 1.75rem); }
h3 { font-size: 1.25rem; }
small, .text-muted { color: var(--ppt-muted); }

/* Lists */
ul, ol { margin-block: 0.75rem 1rem; padding-inline-start: 1.25rem; }
li { margin-block: 0.25rem; }
dl { margin: 1rem 0; }
dt { font-weight: 600; }
dd { margin: 0 0 0.5rem 0; }

/* Blockquotes */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-inline-start: 4px solid var(--ppt-primary);
  background: var(--ppt-bg-soft);
}

/* Code */
pre, code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
pre {
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
}

/* ========= 4) WP Content Elements ========= */
.alignwide { max-inline-size: 1080px; margin-inline: auto; }
.alignfull { inline-size: 100%; margin-inline: 0; }
.wp-caption { color: var(--ppt-muted); font-size: var(--step--1); }
.wp-block-image img { border-radius: 8px; }
.wp-block-separator { border: none; border-block-start: 1px solid var(--ppt-border); margin-block: 1.5rem; }
.wp-block-table { border-collapse: collapse; inline-size: 100%; }
.wp-block-table td, .wp-block-table th {
  border: 1px solid var(--ppt-border);
  padding: 0.5rem 0.75rem;
}
.wp-block-quote { border-inline-start: 4px solid var(--ppt-primary); background: var(--ppt-bg-soft); padding: 1rem; }

/* ========= 5) Forms & Buttons ========= */
input, textarea, select {
  font: inherit;
  color: inherit;
  border: 1px solid var(--ppt-border);
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  inline-size: 100%;
}
button, .button, input[type="submit"] {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border: 0;
  color: #fff;
  background: var(--ppt-primary);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  transition: filter .15s ease, transform .02s ease-in;
}
button:hover, .button:hover, input[type="submit"]:hover { filter: brightness(0.95); }
button:active, .button:active, input[type="submit"]:active { transform: translateY(1px); }
label { display: inline-block; margin-block: 0.35rem 0.25rem; font-weight: 600; }
fieldset { border: 1px solid var(--ppt-border); border-radius: 8px; padding: 0.75rem; }

/* ========= 6) Tables ========= */
table { border-collapse: collapse; inline-size: 100%; margin-block: 1rem; }
th, td { border: 1px solid var(--ppt-border); padding: 0.5rem 0.75rem; }
th { background: #f1f5f9; text-align: start; }

/* ========= 7) Helpers & Utilities ========= */
.mt-0 { margin-block-start: 0 !important; }
.mb-0 { margin-block-end: 0 !important; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.muted { color: var(--ppt-muted); }
.hide { display: none !important; }

/* ========= 8) Theme-specific small components ========= */
.ppt-app {
  min-block-size: 220px;
  border: 1px dashed #cbd5e1;
  padding: 1rem;
  margin-block: 1rem;
  border-radius: 8px;
  background: #fff;
}

/* Notices */
.notice {
  padding: .75rem 1rem;
  border: 1px solid var(--ppt-border);
  border-radius: 8px;
  background: var(--ppt-bg-soft);
}

/* ========= 9) Header/Footer spacing ========= */
.site-header .container,
.site-footer .container { padding-block: .75rem; }

/* ========= 10) Print tweaks ========= */
@media print {
  a { text-decoration: underline; color: #000; }
  button, .site-header, .site-footer { display: none; }
  .container { max-inline-size: none; padding-inline: 0; }
}
