/* ============================================================
   Mullins Tech Solutions — osTicket client portal skin
   Loads AFTER osTicket's own theme.min.css, so these rules win
   on equal specificity without needing !important everywhere.
   Brand tokens pulled from mullinstechsolutions.com/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy-950: #060b14;
  --navy-900: #0a1628;
  --navy-800: #142238;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --cyan-400: #22d3ee;
  --gray-100: #f3f5f8;
  --gray-300: #d7dde5;
  --gray-600: #5b6675;
  --gray-900: #1b2431;
  --white: #ffffff;
  --line: rgba(255,255,255,0.12);
}

/* ---------- Base ---------- */
body, input, select, textarea {
  font-family: 'Inter', system-ui, sans-serif !important;
  color: var(--gray-900);
}
h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif !important;
  letter-spacing: -0.01em;
}
h1 { color: var(--navy-900); }
h2 { color: var(--navy-900); }
a { color: var(--blue-600); }

body {
  background: var(--gray-100) !important;
}

/* ---------- Container ---------- */
#container {
  width: 100%;
  max-width: 1120px;
  box-shadow: none !important;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 24px;
  margin-bottom: 24px;
}

/* ---------- Header ---------- */
#header {
  background: var(--navy-900);
  height: auto;
  min-height: 76px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
}
#header #logo {
  height: 40px;
}
#header p {
  color: var(--gray-300);
  font-size: 13px;
  padding: 6px 0;
}

/* ---------- Nav ---------- */
#nav {
  background: var(--navy-900) !important;
  border-top: none;
  box-shadow: none;
  margin: 0;
  padding: 0 28px;
  height: auto;
}
#nav li a {
  border-radius: 0;
  background-color: transparent !important;
  color: var(--gray-300) !important;
  height: 44px;
  line-height: 44px;
  border-bottom: 2px solid transparent;
  padding-left: 32px;
}
#nav li a.active,
#nav li a:hover {
  background-color: transparent !important;
  color: var(--white) !important;
  border-bottom-color: var(--cyan-400);
}

/* ---------- Content area ---------- */
#content {
  background: var(--white);
  margin: 0;
  padding: 32px 28px;
}

/* ---------- Buttons ---------- */
.button, .button:visited,
.green.button, .green.button:visited,
.blue.button, .blue.button:visited {
  background: var(--blue-600) !important;
  border-radius: 8px;
  box-shadow: none !important;
  text-shadow: none;
  border-bottom: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.button:hover, .green.button:hover, .blue.button:hover {
  background: var(--blue-500) !important;
}

/* ---------- Forms (new ticket / login) ---------- */
#ticketForm div input,
#clientLogin div input,
#ticketForm div textarea,
#clientLogin div textarea,
#ticketForm div select,
#clientLogin div select {
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
}
#clientLogin {
  background: var(--gray-100);
  border: 1px solid #e6e9ee;
  border-radius: 12px;
}

/* ---------- Ticket table / thread ---------- */
#ticketTable {
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  overflow: hidden;
}
#ticketTable th {
  background: var(--gray-100) !important;
  color: var(--navy-900);
}
#ticketThread .message th {
  background: #eaf1ff !important;
}
#ticketThread .response th {
  background: var(--gray-100) !important;
}

/* ---------- Footer ---------- */
#footer {
  background: var(--navy-950);
  color: var(--gray-300);
  padding: 24px 28px;
}
#footer a {
  color: var(--gray-300);
}
#footer a:hover {
  color: var(--cyan-400);
}
/* Keep the "Powered by osTicket" badge, but make it visible against the
   dark footer background (the stock badge image assumes a light bg) */
#footer #poweredBy {
  filter: invert(1) brightness(1.6);
  opacity: 0.85;
}

/* ============================================================
   Mobile fix
   osTicket's core theme has NO responsive breakpoints at all —
   #container is a fixed 840px, which is what caused the
   "ratio"/scaling problem on phones. Combined with the viewport
   meta tag the plugin injects, this makes the portal actually
   reflow instead of shrinking to fit.
   ============================================================ */
@media (max-width: 900px) {
  #container {
    width: 100% !important;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  #header {
    padding: 14px 16px;
  }
  #header .wrap,
  #header p {
    float: none;
    width: auto;
    text-align: left;
    margin-top: 8px;
  }

  #nav {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    height: auto;
  }
  #nav li {
    display: block;
    width: 50%;
  }
  #nav li a {
    width: 100%;
    padding-left: 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
  }

  #content {
    padding: 20px 16px;
    min-height: 0 !important;
    height: auto !important;
  }

  #ticketForm div label,
  #clientLogin div label {
    float: none;
    width: 100%;
    margin-bottom: 4px;
  }
  #ticketForm div input,
  #clientLogin div input,
  #ticketForm div textarea,
  #clientLogin div textarea,
  #ticketForm td textarea,
  #clientLogin td textarea {
    width: 100% !important;
    float: none;
    margin-right: 0;
  }
  #clientLogin {
    width: auto;
    padding: 16px;
    background-image: none !important;
  }

  #reply table,
  #reply textarea {
    width: 100% !important;
  }

  #ticketTable, #ticketThread table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .service-block, .grid-3 { grid-template-columns: 1fr; }

  #footer .wrap {
    flex-direction: column;
    text-align: center;
  }
}
