/* ════════════════════════════════════════════════════════════════════════════
   Cake Shop branding for the osTicket customer (branch) portal.
   Injected by nginx (sub_filter before </head>) — osTicket core is untouched.
   Bump ?v= in conf/nginx-problem.conf after editing to bust caches.
   Palette/fonts follow website v27: cream #F4E9D6, pink #E6007E,
   caramel #C4703B, Figtree body + Lora display.
   ════════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Lora:wght@500;600&display=swap');

:root {
  --cs-pink: #E6007E;
  --cs-pink-dark: #B80065;
  --cs-pink-soft: #FDE6F2;
  --cs-cream: #F4E9D6;
  --cs-caramel: #C4703B;
  --cs-caramel-dark: #A65A2A;
  --cs-ink: #2B2024;
  --cs-muted: #7A6B70;
  --cs-line: #EADFD2;
  --cs-radius: 12px;
}

/* ── page ─────────────────────────────────────────────────────────────────── */
html { overflow-y: auto; }
body {
  background: var(--cs-cream) !important;
  color: var(--cs-ink);
  font-size: 16px;
  line-height: 1.5;
}
body, input, select, textarea, button, .button {
  font-family: 'Figtree', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
}
a { color: var(--cs-pink-dark); }

#container {
  width: auto;
  max-width: 900px;
  margin: 24px auto;
  border-radius: var(--cs-radius);
  box-shadow: 0 10px 30px rgba(120, 60, 40, .12);
  overflow: hidden;
}

/* ── header + nav ─────────────────────────────────────────────────────────── */
#header {
  height: auto;
  min-height: 72px;
  padding: 14px 24px 10px;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#header > .pull-right, #header > .pull-left { float: none; }
#header #logo img { max-height: 64px; max-width: 260px; }
#header p { width: auto; padding: 0; font-size: 14px; color: var(--cs-muted); }

#nav {
  height: auto;
  margin: 0;
  padding: 8px 18px;
  background: #fff !important;
  border-top: 1px solid var(--cs-line);
  border-bottom: 1px solid var(--cs-line);
  box-shadow: none;
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#nav li a {
  height: auto;
  line-height: 1.2;
  margin: 0;
  padding: 9px 14px 9px 36px;
  border-radius: 999px;
  color: var(--cs-ink);
  font-weight: 500;
  font-size: 15px;
  background-position: 12px 50%;
}
#nav li a:hover { background-color: var(--cs-pink-soft); color: var(--cs-pink-dark); }
#nav li a.active { background-color: var(--cs-pink); color: #fff; }

/* ── content ──────────────────────────────────────────────────────────────── */
#content { margin: 0 24px; padding: 24px 0 32px; min-height: 300px; }

h1, h2, #content > h1, #landing_page h1 {
  font-family: 'Lora', Georgia, serif !important;
  font-weight: 600;
  color: var(--cs-pink-dark);
}
h1 { font-size: 30px; margin: 0 0 12px; }
#content h1 + p, #content > p { color: var(--cs-ink); }
.thread-body p { font-size: 16px; }

/* landing: big, obvious buttons */
#landing_page .main-content { width: auto; flex: 1 1 380px; }
#landing_page { display: flex; flex-wrap: wrap; gap: 28px; }
#landing_page > .clear { display: none; }
#landing_page .sidebar { float: none; width: auto; flex: 0 1 280px; margin: 0; padding: 0; order: 2; }
#landing_page .sidebar .front-page-button { margin: 0 0 14px; }
#landing_page #new_ticket, #landing_page #check_status {
  margin: 0; padding: 0; width: auto; background: none;
}
.front-page-button .button,
#landing_page .sidebar .button {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 18px 20px;
  font-size: 19px;
  font-weight: 600;
  border-radius: var(--cs-radius);
  text-shadow: none;
  border: 0;
}

/* ── buttons ──────────────────────────────────────────────────────────────── */
.button, .button:visited, .blue.button, .blue.button:visited {
  background-color: var(--cs-pink);
  box-shadow: 0 4px 12px rgba(230, 0, 126, .25);
}
.button:hover, .blue.button:hover { background-color: var(--cs-pink-dark); }
.green.button, .green.button:visited {
  background-color: var(--cs-caramel);
  box-shadow: 0 4px 12px rgba(196, 112, 59, .25);
}
.green.button:hover { background-color: var(--cs-caramel-dark); }

input[type=submit], button[type=submit], .btn, .login-box .btn {
  background: var(--cs-pink) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 11px 26px !important;
  font-size: 16px !important;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(230, 0, 126, .25);
  text-shadow: none;
}
input[type=submit]:hover, button[type=submit]:hover, .btn:hover { background: var(--cs-pink-dark) !important; }
input[type=reset], input[type=button] {
  background: #fff;
  color: var(--cs-ink);
  border: 1px solid var(--cs-line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
}
p.buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── form fields: big enough to hit with a thumb, 16px so iOS doesn't zoom ── */
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], select, textarea {
  font-size: 16px !important;
  padding: 10px 12px;
  border: 1px solid #D9CCC0;
  border-radius: 8px;
  background: #fff;
  max-width: 100%;
  box-sizing: border-box;
}
select { padding-right: 32px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cs-pink);
  box-shadow: 0 0 0 3px rgba(230, 0, 126, .15);
}
#ticketForm table { width: 100% !important; }
#ticketForm hr, #content hr { border-top: 1px solid var(--cs-line); background: var(--cs-line); }
#ticketForm input[type=text], #ticketForm select { width: 100%; max-width: 520px; }
#ticketForm .form-header h3 { font-family: 'Lora', Georgia, serif; color: var(--cs-pink-dark); font-size: 20px; margin: 10px 0 2px; }
#ticketForm label, #ticketForm td { font-size: 16px; }
#ticketForm em { font-size: 14px; }
.redactor-box, .redactor-layer { border-radius: 8px; }
.filedrop .dropzone { border-radius: 8px; padding: 14px; font-size: 15px; }

/* "Help Topic" → plain English (label text lives in core template) */
#ticketForm .form-header b { font-size: 0; }
#ticketForm .form-header b::after {
  content: "What's broken?";
  font-size: 20px;
  font-family: 'Lora', Georgia, serif;
  color: var(--cs-pink-dark);
}

/* landing/page bodies come from the CMS with their own font stack */
.thread-body, .thread-body p, .thread-body li, .redactor-layer, .redactor-placeholder {
  font-family: 'Figtree', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* login: plain white card, no padlock, no "I'm an agent" clutter for branches */
#clientLogin {
  max-width: 420px;
  margin-top: 16px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius);
  box-shadow: 0 6px 20px rgba(120, 60, 40, .08);
}
#clientLogin > div { display: block !important; }
#clientLogin .login-box { display: block; width: auto; padding: 0; box-shadow: none; }
#clientLogin .login-box strong { color: #c0392b; display: block; margin-bottom: 6px; }
#clientLogin input[type=text], #clientLogin input[type=password] { width: 100%; margin-bottom: 12px; }
#clientLogin .login-box + div { padding: 14px 0 0 !important; font-size: 13px; color: var(--cs-muted); }
#clientLogin .login-box + div b { font-weight: 500; }
#clientLogin + p, #clientLogin ~ p { color: var(--cs-muted); font-size: 14px; }

/* ticket list / view */
table.list, #ticketTable { border-radius: 8px; overflow: hidden; }
table.list thead th, #ticketTable th { background: var(--cs-pink-soft) !important; color: var(--cs-ink); }
.thread-entry .header { border-radius: 8px 8px 0 0; }

/* ── footer: keep it quiet ────────────────────────────────────────────────── */
#footer { color: var(--cs-muted); padding-bottom: 24px; }
#footer a { color: var(--cs-muted); }
#footer #poweredBy { display: none; }

/* ── phones / small tablets ───────────────────────────────────────────────── */
@media (max-width: 920px) {
  #container { margin: 0; border-radius: 0; box-shadow: none; }
  #content { margin: 0 16px; }
  #header { padding: 12px 16px 8px; }
  #nav { padding: 8px 12px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 25px; }
  #header { flex-direction: column-reverse; align-items: flex-start; }
  #header #logo img { max-height: 52px; }
  #nav li a { font-size: 14px; padding: 8px 10px 8px 30px; background-position: 8px 50%; }
  /* the ticket form is a 2-column table — stack it */
  #ticketForm table, #ticketForm tbody, #ticketForm tr, #ticketForm td { display: block; width: auto !important; }
  #ticketForm td { padding: 2px 0; }
  #ticketForm input[type=text] { max-width: none; }
  #ticketForm select { max-width: calc(100% - 18px); }
  p.buttons input { flex: 1 1 auto; }
  #landing_page .sidebar { flex-basis: 100%; order: 0; }  /* buttons first on a phone */
  table.list, #ticketTable { font-size: 14px; }
  .redactor-toolbar { overflow-x: auto; white-space: nowrap; }
}
