/* =========================================================================
   Baltimore Air Group — osTicket client theme
   Palette: Maryland flag
     Calvert gold   #FFD200   Calvert black  #1A1A1A
     Crossland red  #C8102E   Crossland white #FFFFFF
   ========================================================================= */

:root {
  --md-gold:        #FFD200;
  --md-gold-deep:   #E6BD00;
  --md-black:       #1A1A1A;
  --md-red:         #C8102E;
  --md-red-deep:    #A60D26;
  --md-white:       #FFFFFF;

  --bg-page:        #F4F5F7;
  --bg-surface:     #FFFFFF;
  --bg-muted:       #F8F9FB;
  --border:         #E3E6EA;
  --border-strong:  #C9CED5;
  --text:           #1F2328;
  --text-muted:     #5A6470;
  --link:           #0B5FBF;
  --link-hover:     #08407F;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.06);
  --shadow:    0 4px 14px rgba(15, 20, 25, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 20, 25, 0.12);
  --focus:     0 0 0 3px rgba(255, 210, 0, 0.45);
}

/* ---------- Reset / base ------------------------------------------------- */
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body, input, select, textarea, button { color: var(--text); }
img { border: 0; vertical-align: middle; max-width: 100%; }
form { margin: 0; }
hr  { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
small { font-size: 85%; color: var(--text-muted); }

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--link-hover); text-decoration: underline; }

h1, h2, h3, h4, h5 {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 .6em 0;
  line-height: 1.25;
}
h1 { font-size: 28px; letter-spacing: -.01em; }
h2 { font-size: 20px; color: var(--text); }
h3 { font-size: 17px; }
h4 { font-size: 15px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Layout ------------------------------------------------------- */
#container {
  width: auto;
  max-width: 1100px;
  margin: 24px auto 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

/* Maryland flag accent stripe along the top of the page card. */
#container::before {
  content: "";
  display: block;
  height: 6px;
  background:
    linear-gradient(
      to right,
      var(--md-gold)  0%,   var(--md-gold)  25%,
      var(--md-black) 25%,  var(--md-black) 50%,
      var(--md-red)   50%,  var(--md-red)   75%,
      var(--md-white) 75%,  var(--md-white) 100%
    );
  background-size: 80px 6px;
  background-repeat: repeat-x;
}

#header {
  position: relative;
  height: auto;
  min-height: 80px;
  padding: 18px 28px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#header::after { content: ""; display: block; clear: both; }

#header #logo {
  width: auto;
  height: 56px;
  float: none;
  display: inline-flex;
  align-items: center;
}
#header #logo img { max-height: 56px; width: auto; }

#header p {
  width: auto;
  float: none;
  padding: 0;
  margin: 0;
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
}
#header p a { color: var(--text); font-weight: 500; }
#header p a:hover { color: var(--md-red); text-decoration: none; }

/* ---------- Nav ---------------------------------------------------------- */
#nav {
  margin: 0;
  padding: 0 28px;
  height: auto;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  display: flex;
  align-items: stretch;
  list-style: none;
  overflow-x: auto;
}
#nav li { margin: 0; padding: 0; list-style: none; display: block; }
#nav li a {
  display: flex;
  align-items: center;
  float: none;
  height: 44px;
  line-height: 1;
  padding: 0 16px 0 36px;
  margin: 0 4px 0 0;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  border-radius: 0;
  background-position: 12px 50%;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  border-bottom: 3px solid transparent;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
#nav li a:hover {
  background-color: transparent;
  color: var(--md-red);
  text-decoration: none;
  border-bottom-color: var(--md-gold);
}
#nav li a.active {
  background-color: transparent;
  color: var(--md-black);
  border-bottom-color: var(--md-red);
}

#nav li a.home    { background-image: url('../images/icons/home.png'); }
#nav li a.kb      { background-image: url('../images/icons/kb.png'); }
#nav li a.new     { background-image: url('../images/icons/new.png'); }
#nav li a.status  { background-image: url('../images/icons/status.png'); }
#nav li a.tickets { background-image: url('../images/icons/tix.png'); }

/* ---------- Content ------------------------------------------------------ */
#content {
  padding: 28px;
  margin: 0;
  height: auto !important;
  min-height: 400px;
  background: var(--bg-surface);
}

/* ---------- Footer ------------------------------------------------------- */
#footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 18px 28px;
  border-top: 1px solid var(--border);
}
#footer a { color: var(--text-muted); }
#footer a:hover { color: var(--md-red); }
#footer p { margin: 6px 0; }
#footer #poweredBy {
  display: block;
  width: 126px;
  height: 23px;
  outline: none;
  text-indent: -9999px;
  margin: 6px auto 0;
  background: url('../images/poweredby.png') top left no-repeat;
  opacity: .55;
  transition: opacity .15s ease;
}
#footer #poweredBy:hover { opacity: 1; }

/* ---------- Banners / inline status messages ----------------------------- */
.error_bar, .warning_bar, .notice_bar {
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.error_bar   { background: #FDECEE; color: var(--md-red-deep); border-color: #F4C2C8; }
.warning_bar { background: #FFF7D6; color: #6B5400;            border-color: #F0E2A0; }
.notice_bar  { background: #E8F4EA; color: #1E5128;            border-color: #BFE0C5; }

#msg_notice, #msg_warning, #msg_error {
  margin: 0 0 16px 0;
  padding: 12px 14px 12px 42px;
  height: auto;
  min-height: 20px;
  line-height: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  background-repeat: no-repeat;
  background-position: 12px 50%;
}
#msg_notice  { background-color: #E8F4EA; color: #1E5128; border-color: #BFE0C5;
               background-image: url('../images/icons/ok.png'); }
#msg_warning { background-color: #FFF7D6; color: #6B5400; border-color: #F0E2A0;
               background-image: url('../images/icons/alert.png'); }
#msg_error   { background-color: #FDECEE; color: var(--md-red-deep); border-color: #F4C2C8;
               background-image: url('../images/icons/error.png'); }

.warning { background: #FFF7D6; padding: 8px 12px; border-radius: var(--radius-sm); font-style: italic; }
.warning strong { text-transform: uppercase; color: var(--md-red-deep); font-style: normal; }
.error   { color: var(--md-red-deep); }
.error input { border: 1px solid var(--md-red); }

/* ---------- Buttons ------------------------------------------------------ */
.button, .button:visited, button, input[type="submit"], input[type="button"] {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  width: auto;
  min-width: 140px;
  text-align: center;
  color: var(--md-black);
  background: var(--md-gold);
  text-decoration: none;
  border: 1px solid var(--md-gold-deep);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-shadow: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background-color .12s ease, box-shadow .12s ease, transform .04s ease;
}
.button:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background-color: var(--md-gold-deep);
  color: var(--md-black);
  text-decoration: none;
}
.button:focus, button:focus,
input[type="submit"]:focus, input[type="button"]:focus {
  outline: none;
  box-shadow: var(--focus);
}
.button:active, button:active { transform: translateY(1px); box-shadow: none; }

.green.button, .green.button:visited {
  background-color: var(--md-red);
  border-color: var(--md-red-deep);
  color: var(--md-white);
}
.green.button:hover { background-color: var(--md-red-deep); color: var(--md-white); }

.blue.button, .blue.button:visited {
  background-color: var(--md-black);
  border-color: #000;
  color: var(--md-white);
}
.blue.button:hover { background-color: #000; color: var(--md-white); }

/* ---------- Forms -------------------------------------------------------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"],
input[type="url"], textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(15, 20, 25, 0.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="search"]:focus, input[type="number"]:focus, input[type="tel"]:focus,
input[type="url"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--md-gold-deep);
  box-shadow: var(--focus);
}
textarea { min-height: 120px; }
label { font-weight: 500; }

/* osTicket's search box on the landing page */
.search-form { margin: 0 0 24px 0; }
.search-form input.search {
  width: 60%;
  min-width: 280px;
  padding: 12px 14px;
  font-size: 15px;
}
.search-form button { margin-left: 8px; }

/* ---------- Landing page ------------------------------------------------- */
#landing_page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
#landing_page .main-content { min-width: 0; }
#landing_page .thread-body h1 { margin-top: 0; }

#landing_page #new_ticket,
#landing_page #check_status {
  margin-top: 0;
  width: auto;
  float: none;
  padding: 18px 18px 18px 80px;
  background-position: 16px 50%;
  background-repeat: no-repeat;
  background-color: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
#landing_page #new_ticket:hover,
#landing_page #check_status:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: var(--md-gold-deep);
}
#landing_page #new_ticket    { background-image: url('../images/new_ticket_icon.png'); }
#landing_page #check_status  { background-image: url('../images/check_status_icon.png'); }

/* Pair the two cards side-by-side on wider viewports. */
@media (min-width: 720px) {
  #landing_page { grid-template-columns: 1fr 1fr; }
  #landing_page .main-content { grid-column: 1 / -1; }
}

/* ---------- Knowledge base / featured categories ------------------------- */
.featured-category, .front-page {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px 0;
  box-shadow: var(--shadow-sm);
}
.featured-category .category-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--md-black);
  margin: 4px 0 12px;
  display: inline-block;
  padding-left: 8px;
  border-left: 3px solid var(--md-gold);
}
.article-headline {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.article-headline:first-of-type { border-top: 0; }
.article-title a {
  font-weight: 600;
  color: var(--link);
}
.article-teaser {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

#faq {
  clear: both;
  margin: 0;
  padding: 0;
}
#faq ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
#faq ol li { list-style: none; margin: 0; padding: 0; color: var(--text-muted); }
#faq ol li a {
  display: block;
  padding: 10px 12px 10px 32px;
  border-bottom: 1px solid var(--border);
  background: url('../images/icons/page.png') 8px 50% no-repeat;
  color: var(--link);
}
#faq ol li a:hover {
  background-color: #FFF8DB;
  color: var(--link-hover);
  text-decoration: none;
}
#faq .article-meta { padding: 8px 12px; background: var(--bg-muted); color: var(--text-muted); }

/* ---------- Pagination --------------------------------------------------- */
#pagination {
  border: 0;
  margin: 24px 0 32px 0;
  padding: 0;
}
#pagination li {
  border: 0;
  margin: 0 2px 0 0;
  padding: 0;
  font-size: 12px;
  list-style: none;
  display: inline-block;
}
#pagination li a, #pagination li .active,
#pagination .previousOff, #pagination .nextOff {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
#pagination li a:hover {
  background: var(--md-gold);
  border-color: var(--md-gold-deep);
  color: var(--md-black);
}
#pagination .active {
  background: var(--md-black);
  border-color: var(--md-black);
  color: var(--md-white);
}
#pagination .previousOff, #pagination .nextOff { color: var(--text-muted); }

/* ---------- Tables ------------------------------------------------------- */
table { border-collapse: collapse; width: 100%; }
table.list, table.list th, table.list td { border: 1px solid var(--border); }
table.list { background: var(--bg-surface); border-radius: var(--radius-sm); overflow: hidden; }
table.list th {
  background: var(--bg-muted);
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
table.list td { padding: 10px 12px; vertical-align: top; font-size: 14px; }
table.list tr:hover td { background: #FFF8DB; }

/* ---------- Thread (ticket conversation) --------------------------------- */
.thread-body {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px 0;
}
.thread-body h1, .thread-body h2 { margin-top: 0; }
.thread-body img { max-width: 100%; height: auto; }

/* ---------- Loading overlay --------------------------------------------- */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
  z-index: 9000;
}
#loading {
  display: none;
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  padding: 20px 24px;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9001;
}
#loading h4 { color: var(--md-black); margin: 0 0 6px; }

/* ---------- Helpers ------------------------------------------------------ */
.centered { text-align: center; }
.clear    { clear: both; height: 1px; visibility: hidden; }
.hidden   { display: none; }
.faded    { color: var(--text-muted); }
.pull-left   { float: left; }
.pull-right  { float: right; }
.flush-left  { margin-left: 0; padding-left: 0; }
.flush-right { margin-right: 0; padding-right: 0; }
.valign-helper {
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 720px) {
  #container { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  #header   { flex-direction: column; align-items: flex-start; padding: 16px 18px 10px; }
  #header p { text-align: left; }
  #nav      { padding: 0 8px; }
  #nav li a { padding: 0 12px 0 32px; font-size: 13px; }
  #content  { padding: 18px; }
  .search-form input.search { width: 100%; min-width: 0; }
  .button, button, input[type="submit"] { width: 100%; }
}
