/* Silvertoad customer portal */
body {
  background: #f0f5f9;
  color: #172c40;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
body #container {
  box-sizing: border-box;
  width: min(1050px, calc(100% - 32px));
  margin: 24px auto 16px;
  padding: 0;
  border: 1px solid #dbe5ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 45px #17395312;
}
#container #header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 16px;
  height: auto;
  min-height: 78px;
  padding: 12px clamp(16px, 4vw, 40px);
}
#container #header #logo { height: auto; }
#header #logo img { display: block; max-width: min(45vw, 225px); height: auto; }
#header .valign-helper { display: none; }
#container #nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  width: auto;
  height: auto;
  margin: 0;
  padding: 9px clamp(12px, 4vw, 40px);
  background: #f5f9fc;
  border: 0;
  border-block: 1px solid #e3ebf1;
  box-shadow: none;
}
#container #nav li { float: none; margin: 0; }
#container #nav a {
  display: block;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #34536a;
  line-height: 1.3;
  font-weight: 600;
}
#container #nav a:hover, #container #nav a.active { background: #e0f1fb; color: #07557b; }
#container #content { padding: clamp(18px, 4vw, 40px); min-height: 0; }
#content h1 { color: #172c40; font-size: clamp(24px, 3.5vw, 36px); line-height: 1.18; font-weight: 750; }
#footer { color: #486377; }
#container :focus-visible { outline: 3px solid #1685bd; outline-offset: 2px; }

/* The ticket form keeps osTicket's native inputs, validation, and uploads. */
#ticketForm { margin-top: 24px; }
#ticketForm > table { display: block; width: 100%; }
#ticketForm > table > tbody {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  width: 100%;
  margin: 0 0 16px;
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid #dce7ef;
  border-radius: 13px;
  background: #fbfdff;
}
#ticketForm > table > tbody:empty { display: none; }
#ticketForm > table > tbody:nth-child(2) { grid-template-columns: minmax(0, 1fr); }
#ticketForm > table > tbody > tr { display: block; min-width: 0; }
#ticketForm > table > tbody > tr > td { display: block; padding: 0 !important; }
#ticketForm > table > tbody > tr:has(.form-header, .filedrop, textarea, input[type=tel], hr),
#ticketForm > table > tbody > tr.captchaRow { grid-column: 1 / -1; }
#ticketForm > table > tbody > tr:has(.form-header) hr,
#ticketForm > table > tbody > tr:has(hr):not(:has(.form-header)),
#ticketForm > table > tbody:last-child > tr:not(.captchaRow) { display: none; }
#ticketForm > table > tbody:last-child:not(:has(.captchaRow)) { display: none; }
#ticketForm .form-header { margin: 0 !important; color: #3d5b71; }
#ticketForm .form-header h3, #ticketForm .form-header b {
  display: block;
  margin: 0 0 3px;
  color: #172c40;
  font-size: 18px;
  font-weight: 700;
}
#ticketForm #dynamic-form > tr:has(.form-header):not(:first-child) {
  border-top: 1px solid #dce7ef;
  margin-top: 8px;
  padding-top: 18px;
}
#ticketForm label { color: #223e53; font-weight: 600; }
#ticketForm .error { color: #ad281f; }
#ticketForm input:is([type=text],[type=email],[type=tel],[type=url]), #ticketForm select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 5px 0 0;
  padding: 8px 10px;
  border: 1px solid #aebfcd;
  border-radius: 7px;
  background: #fff;
  color: #172c40;
  font: inherit;
}
#ticketForm input[type=tel] { width: min(65%, 280px); }
#ticketForm input[name$="-ext"] { width: 66px; }
#ticketForm #topicId { width: min(90%, 420px); }
#ticketForm .redactor-box { border: 1px solid #bdcdda; border-radius: 8px; }
#ticketForm .redactor-editor { min-height: 125px !important; }
#ticketForm .filedrop .dropzone {
  padding: 12px;
  border-color: #8eafc3;
  border-radius: 8px;
  background: #f1f8fc;
  color: #35576d;
}
#ticketForm .captchaRow > td { margin-bottom: 4px; }
#ticketForm .captchaRow .captcha img { float: none; vertical-align: middle; }
#ticketForm #captcha { width: 110px; margin: 4px 8px 4px 0; }
#ticketForm .buttons { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 0; }
#ticketForm .buttons input {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid #adbfcd;
  border-radius: 8px;
  background: #fff;
  color: #24475f;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
#ticketForm .buttons input[type=submit] { background: #08668f; border-color: #08668f; color: #fff; }
#ticketForm .buttons input[type=submit]:hover { background: #074f70; }
@media (max-width: 640px) {
  body #container { width: calc(100% - 16px); margin-top: 8px; border-radius: 12px; }
  #container #nav a { padding: 7px 8px; font-size: 13px; }
  #ticketForm > table > tbody { grid-template-columns: minmax(0, 1fr); }
}

#container #header > .pull-right { width: auto; min-width: 0; }
#ticketForm > table > tbody > tr > td { width: auto; max-width: none; }

#container #header > .pull-right p { width: auto; margin: 0; }
#ticketForm input[type=tel] { width: min(calc(100% - 105px), 280px); }
