/* =====================================================================
   IEP osTicket theme — "playful" style for the CLIENT PORTAL
   Optional layer on top of client.css. Switch on/off with:
     ./install.sh <osticket> --style playful    |    --style classic
   ===================================================================== */

/* ---- Rounded font for headings, menu & buttons (SIL OFL, bundled) ---- */
@font-face {
  font-family: "IEP Comfortaa"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(fonts/comfortaa-greek-wght-normal.woff2) format("woff2-variations"), url(fonts/comfortaa-greek-wght-normal.woff2) format("woff2");
  unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;
}
@font-face {
  font-family: "IEP Comfortaa"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(fonts/comfortaa-latin-ext-wght-normal.woff2) format("woff2-variations"), url(fonts/comfortaa-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20AB,U+20AD-20C0,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IEP Comfortaa"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url(fonts/comfortaa-latin-wght-normal.woff2) format("woff2-variations"), url(fonts/comfortaa-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212;
}

:root {
  --pf-coral:  #ff7a59;
  --pf-sun:    #ffc23d;
  --pf-mint:   #22b39b;
  --pf-sky:    #3fa7f5;
  --pf-grape:  #8a6cff;
  --pf-round:  "IEP Comfortaa", var(--iep-font);
  --pf-radius: 18px;
  --pf-bounce: cubic-bezier(.34,1.56,.64,1);
}

/* ---------- Background: soft colour blobs + dots ---------- */
html, body {
  background-color: #f3f6fc !important;
  background-image:
    radial-gradient(circle at 8% 12%,  rgba(255,194,61,.28) 0, rgba(255,194,61,0) 260px),
    radial-gradient(circle at 92% 18%, rgba(63,167,245,.22) 0, rgba(63,167,245,0) 300px),
    radial-gradient(circle at 85% 88%, rgba(255,122,89,.18) 0, rgba(255,122,89,0) 320px),
    radial-gradient(circle at 12% 85%, rgba(34,179,155,.18) 0, rgba(34,179,155,0) 280px),
    radial-gradient(rgba(29,79,145,.07) 1.2px, transparent 1.3px) !important;
  background-size: auto, auto, auto, auto, 22px 22px !important;
  background-attachment: fixed !important;
}

h1, h2, h3, #content h1, .form-header h3, #ticketForm .form-header h3 {
  font-family: var(--pf-round);
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ---------- Card ---------- */
#container {
  border-radius: var(--pf-radius);
  border: 0;
  box-shadow: 0 10px 30px rgba(29,79,145,.10), 0 2px 6px rgba(29,79,145,.06);
  overflow: visible;
}

/* rainbow ribbon instead of the plain top line */
#header {
  border-top: 0;
  border-radius: var(--pf-radius) var(--pf-radius) 0 0;
  position: relative;
}
#header:before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 6px;
  border-radius: var(--pf-radius) var(--pf-radius) 0 0;
  background: linear-gradient(90deg, var(--pf-coral), var(--pf-sun), var(--pf-mint), var(--pf-sky), var(--pf-grape));
}
#header #logo img { transition: transform .4s var(--pf-bounce); }
#header #logo:hover img { transform: rotate(-3deg) scale(1.04); }

/* ---------- Menu: pills ---------- */
#nav {
  margin: 0 18px;
  padding: 8px 6px;
  border-radius: 12px;
  row-gap: 6px;
  background: var(--iep-brand);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
#nav li a, .rtl #nav li a {
  height: 38px; line-height: 38px;
  margin: 0 1px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
  border-bottom: 0;
  font-family: var(--pf-round);
  font-weight: 700;
  font-size: 14px;
  transition: background-color .2s, color .2s, transform .25s var(--pf-bounce);
}
#nav li a:hover { transform: translateY(-2px); background-color: rgba(255,255,255,.16); }
#nav li a.active {
  background: #fff;
  color: var(--iep-brand);
  box-shadow: 0 3px 0 var(--pf-sun);
}
#nav li a:before { transition: transform .35s var(--pf-bounce); display: inline-block; }
#nav li a:hover:before { transform: rotate(-12deg) scale(1.2); }

#content { padding-top: 34px; }

/* ---------- Buttons: chunky & bouncy ---------- */
.button, .button:visited,
input[type=submit], input[type=button], input[type=reset], #content button {
  font-family: var(--pf-round);
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 24px;
  transition: transform .25s var(--pf-bounce), box-shadow .2s, background-color .2s;
}
input[type=submit], .button, .blue.button, .green.button,
#clientLogin div input[type=submit], #ticketForm div input[type=submit] {
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
input[type=submit]:hover, .button:hover,
input[type=reset]:hover, input[type=button]:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 rgba(0,0,0,.16);
}
input[type=submit]:active, .button:active,
input[type=reset]:active, input[type=button]:active {
  top: 0;
  transform: translateY(2px) scale(.98);
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
input[type=reset], input[type=button] { box-shadow: 0 3px 0 var(--iep-border); }

/* landing page buttons */
#landing_page .sidebar {
  border-radius: var(--pf-radius);
  background: linear-gradient(160deg, #eef5ff 0%, #fff6e3 100%);
  border: 2px dashed rgba(29,79,145,.18);
}
.front-page-button .button { border-radius: 16px; padding: 14px 16px; font-size: 15.5px; }
.front-page-button .blue.button  { background: linear-gradient(135deg, var(--iep-brand), var(--pf-sky)); }
.front-page-button .green.button { background: linear-gradient(135deg, var(--pf-mint), #4fd1a5); }
.front-page-button .blue.button:hover  { transform: translateY(-3px) rotate(-1.5deg); }
.front-page-button .green.button:hover { transform: translateY(-3px) rotate(1.5deg); }

/* waving hand next to the welcome title */
#landing_page .main-content h1:first-child:after {
  content: "👋";
  display: inline-block;
  margin-left: .3em;
  transform-origin: 70% 80%;
  animation: pf-wave 2.4s ease-in-out 1s 2;
}
@keyframes pf-wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

/* ---------- Form fields ---------- */
#content input[type=text], #content input[type=email], #content input[type=tel],
#content input[type=password], #content input[type=number], #content input[type=search],
#content select, #content textarea {
  border-radius: 12px;
  border-width: 2px;
  border-color: #dbe3ef;
}
#content input:focus, #content select:focus, #content textarea:focus {
  border-color: var(--pf-sky);
  box-shadow: 0 0 0 4px rgba(63,167,245,.18);
}
.redactor-box { border-radius: 14px; border-width: 2px !important; border-color: #dbe3ef !important; }
.filedrop .dropzone { border-radius: 14px; border-color: #c9d6ea !important; }
.filedrop .dropzone:hover { border-color: var(--pf-sky) !important; background: #f3f9ff !important; }

/* section titles get a little colour dot */
#ticketForm .form-header h3:before, .form-header h3:before {
  content: "";
  display: inline-block; width: 10px; height: 10px; margin-right: 10px;
  border-radius: 50%; background: var(--pf-sun); vertical-align: middle;
  box-shadow: 14px 0 0 var(--pf-coral), 28px 0 0 var(--pf-mint);
  margin-right: 40px;
}

/* ---------- Messages ---------- */
#msg_error, #msg_notice, #msg_warning { border-radius: 14px; border-width: 2px; animation: pf-pop .45s var(--pf-bounce); }
#msg_notice:after { content: " 🎉"; }
@keyframes pf-pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Tables & cards ---------- */
#ticketTable, table.list, #content table#ticketTable { border-radius: 14px; }
#ticketTable tbody tr { transition: background-color .2s; }
#ticketTable tbody tr:hover td { background: #fff8e6; }
.featured-category, #kb > li, #clientLogin, table.infoTable, #ticketInfo table {
  border-radius: var(--pf-radius) !important;
}
.featured-category, #kb > li { transition: transform .25s var(--pf-bounce), box-shadow .2s; }
.featured-category:hover, #kb > li:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(29,79,145,.10); }

/* thread bubbles */
.thread-entry .header { border-radius: 16px 16px 0 0 !important; }
.thread-entry .thread-body { border-radius: 0 0 16px 16px !important; }

/* ---------- "Please wait" box ---------- */
#loading {
  border-radius: var(--pf-radius) !important;
  border: 0 !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.18) !important;
  font-family: var(--pf-round);
}
#loading h4:before { content: "⏳ "; }

/* ---------- Footer ---------- */
#footer p:after { content: " · 💙"; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  html, body { background-attachment: scroll !important; }
  #container { border-radius: 0; }
  #header, #header:before { border-radius: 0; }
  #nav { margin: 0; border-radius: 0; padding: 8px; }
  #nav li a, .rtl #nav li a { height: auto; line-height: 1.25; padding: 8px 12px; border-radius: 8px; white-space: normal; }
  #nav li a.active { background: #fff; color: var(--iep-brand); box-shadow: 0 3px 0 var(--pf-sun); }
  #nav li a:hover { transform: none; }
  #ticketTable.iep-cards tbody tr { border-radius: 16px; }
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}
