/*
Theme Name: KAL School Manager
Theme URI: https://kal-school-manager.local
Author: KAL School Manager Team
Author URI: https://kal-school-manager.local
Description: Custom theme for the KAL School Manager platform with Tailwind CSS 4.1 integration, Alpine.js, and HTMX support.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.1
Text Domain: kalschoolmanager
*/

/* Tailwind's generated CSS will be placed in assets/dist/tailwind.css */

/* Fallback typography utility classes (duplicated intentionally for first load before Tailwind build) */
.noto-sans {
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

.noto-serif {
  font-family: "Noto Serif", serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.footer-gradient {
  background-color: #ffffff !important;
  background-image: repeating-linear-gradient(135deg, rgba(189,189,189,0.1) 0px, rgba(189,189,189,0.1) 2px, transparent 2px, transparent 4px), linear-gradient(90deg, #ffffff, #ffffff) !important;
  background-repeat: repeat !important;
  color: #111827 !important;
}



.header-gradient {
  background-image: radial-gradient(circle at 15% 59%, rgba(101, 101, 101,0.04) 0%, rgba(101, 101, 101,0.04) 50%,rgba(44, 44, 44,0.04) 50%, rgba(44, 44, 44,0.04) 100%),radial-gradient(circle at 47% 11%, rgba(240, 240, 240,0.04) 0%, rgba(240, 240, 240,0.04) 50%,rgba(29, 29, 29,0.04) 50%, rgba(29, 29, 29,0.04) 100%),radial-gradient(circle at 73% 44%, rgba(252, 252, 252,0.04) 0%, rgba(252, 252, 252,0.04) 50%,rgba(130, 130, 130,0.04) 50%, rgba(130, 130, 130,0.04) 100%),radial-gradient(circle at 72% 91%, rgba(234, 234, 234,0.04) 0%, rgba(234, 234, 234,0.04) 50%,rgba(48, 48, 48,0.04) 50%, rgba(48, 48, 48,0.04) 100%),radial-gradient(circle at 27% 3%, rgba(48, 48, 48,0.04) 0%, rgba(48, 48, 48,0.04) 50%,rgba(163, 163, 163,0.04) 50%, rgba(163, 163, 163,0.04) 100%),linear-gradient(90deg, rgb(200,0,170),rgb(128,0,128));
}

/* Scoped List Styles for Prose Content (WYSIWYG and output) */
.prose ul:not([class*="is-style-kal-"]),
.prose-sm ul:not([class*="is-style-kal-"]) {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.prose ol:not([class*="is-style-kal-"]),
.prose-sm ol:not([class*="is-style-kal-"]) {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.prose ul:not([class*="is-style-kal-"]) > li,
.prose-sm ul:not([class*="is-style-kal-"]) > li,
.prose ol:not([class*="is-style-kal-"]) > li,
.prose-sm ol:not([class*="is-style-kal-"]) > li {
  margin-bottom: 0.25rem !important;
  display: list-item !important;
}

/* Ensure custom Gutenberg lists inside prose inherit correct styling and display */
.prose ul[class*="is-style-kal-"],
.prose-sm ul[class*="is-style-kal-"],
.prose ol[class*="is-style-kal-"],
.prose-sm ol[class*="is-style-kal-"] {
  list-style-type: none !important;
  padding-left: 0 !important;
}

.prose ul[class*="is-style-kal-"] li,
.prose-sm ul[class*="is-style-kal-"] li,
.prose ol[class*="is-style-kal-"] li,
.prose-sm ol[class*="is-style-kal-"] li {
  display: block !important;
}

/* Heading Hierarchy & Typography Formatting for Prose / Report Content */
.prose h1,
.prose-sm h1,
.prose .h1,
.prose h1.wp-block-heading,
h1.wp-block-heading {
  font-size: 2.25rem !important; /* 36px */
  line-height: 1.25 !important;
  font-weight: 800 !important;
  color: #111827 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  display: block !important;
  letter-spacing: -0.025em !important;
}

.prose h2,
.prose-sm h2,
.prose .h2,
.prose h2.wp-block-heading,
h2.wp-block-heading {
  font-size: 1.625rem !important; /* 26px */
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.875rem !important;
  display: block !important;
  letter-spacing: -0.02em !important;
}

.prose h3,
.prose-sm h3,
.prose .h3,
.prose h3.wp-block-heading,
h3.wp-block-heading {
  font-size: 1.25rem !important; /* 20px */
  line-height: 1.4 !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  display: block !important;
  letter-spacing: -0.01em !important;
}

.prose h4,
.prose-sm h4,
.prose .h4,
.prose h4.wp-block-heading,
h4.wp-block-heading {
  font-size: 1.125rem !important; /* 18px */
  line-height: 1.45 !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

.prose h5,
.prose-sm h5,
.prose h6,
.prose-sm h6,
.prose h5.wp-block-heading,
.prose h6.wp-block-heading,
h5.wp-block-heading,
h6.wp-block-heading {
  font-size: 1rem !important; /* 16px */
  line-height: 1.5 !important;
  font-weight: 600 !important;
  color: #4b5563 !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

.prose p,
.prose-sm p {
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.65 !important;
}

.prose > :first-child,
.prose-sm > :first-child {
  margin-top: 0 !important;
}

/* ==========================================================================
   Modern Premium Card Micro-Enhancements
   ========================================================================== */
.bg-white.rounded-lg,
.bg-white.rounded-xl,
.bg-white.rounded-2xl,
[data-ksm-item] {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.bg-white.rounded-lg:hover,
.bg-white.rounded-xl:hover,
.bg-white.rounded-2xl:hover,
[data-ksm-item]:hover {
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.06), 0 4px 8px -4px rgba(0, 0, 0, 0.03);
  border-color: rgba(147, 51, 234, 0.2);
}

/* ==========================================================================
   Clickable Micro-UX Mouse Pointer Clues
   ========================================================================== */
button,
summary,
[role="button"],
[onclick],
.btn,
.btn-primary,
.btn-secondary,
.btn-launch-exp,
.accordion-header,
.accordion-toggle,
.appraisal-accordion-header,
.ksm-role-card,
.ksm-badge-pill,
[data-section],
.wp-block-details > summary,
.wp-block-accordion-header {
  cursor: pointer !important;
}

/* ==========================================================================
   Small-Screen Mobile Typography & Readability Floor
   Bumps up all x-small text (text-xs, text-[10px], text-[11px], micro labels)
   to the next size on small screens (<= 768px) for high legibility and contrast.
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --text-xs: 0.875rem; /* Bumps 12px (text-xs) to 14px (text-sm) */
    --text-2xs: 0.8125rem; /* 13px */
  }

  /* Utility font-size overrides on small screens */
  .text-xs {
    font-size: 0.875rem !important; /* 14px */
    line-height: 1.35 !important;
  }

  .text-\[9px\],
  .text-\[10px\],
  .text-\[11px\],
  .text-2xs {
    font-size: 0.8125rem !important; /* 13px */
    line-height: 1.35 !important;
  }

  /* Boost low-contrast text on mobile displays */
  .text-gray-400,
  .text-slate-400 {
    color: #4b5563 !important; /* text-gray-600 */
  }

  .text-gray-500,
  .text-slate-500 {
    color: #374151 !important; /* text-gray-700 */
  }

  /* Boost form placeholder & inputs on mobile */
  input::placeholder,
  textarea::placeholder {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
  }

  label.text-xs,
  span.text-xs,
  p.text-xs {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
  }

  /* Specific Dashboard Hero & KPI tile overrides on mobile */
  .ksm-term-hero-label {
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .ksm-term-hero-metric-label {
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  .ksm-term-hero-metric-value {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
  }

  .ksm-kpi-split-lbl,
  .ksm-kpi-sub {
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    color: #374151 !important;
  }

  .ksm-kpi-label {
    font-size: 0.875rem !important;
    font-weight: 800 !important;
  }

  /* Establish strong visual hierarchy for Student Names in mobile cards */
  .report-row-item h4,
  [data-ksm-batch="row"] h4,
  .js-class-card .text-base,
  [data-ksm-item="report-meta-card"] .text-base {
    font-size: 1.0625rem !important; /* 17px */
    font-weight: 900 !important;
    line-height: 1.3 !important;
    color: #0f172a !important; /* slate-900 */
  }
}

