/*
 * Gracklepad Stylesheet
 */

/* ---- Reset & Base ---- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  line-height: 1.5;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  background-color: #f5f5f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a:link, a:visited {
  color: #4a5899;
  text-decoration: none;
}

a:hover {
  color: #2e3a6e;
  text-decoration: underline;
}

h1 { font-size: 1.8rem; font-weight: 600; }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

ul { list-style: none; }
img { border: 0; }


/* ---- Site Header ---- */

.Header {
  background-color: #1a1a2e;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.2rem;
  flex-wrap: wrap;
}

.Header .SiteBrand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.Header .SiteBrand .DebugBranch {
  font-size: 0.6em;
  font-weight: 400;
  color: #777;
}

.Header .SiteBrand a:link,
.Header .SiteBrand a:visited,
.Header .SiteBrand a:hover {
  color: #c8c8e0;
  text-decoration: none;
}

.AccountNavigation {
  position: static;
  background: none;
  padding: 0;
  border-radius: 0;
  margin: 0;
}

.AccountNavigation ul {
  display: flex;
  gap: 0.2rem;
}

.AccountNavigation ul li {
  font-size: 0.85rem;
  padding: 0 0.6rem;
  border-left: 1px solid #3a3a5e;
}

.AccountNavigation ul li:first-child {
  border-left: none;
}

.AccountNavigation ul li {
  color: #a0a0c0;
}

.AccountNavigation ul a:link,
.AccountNavigation ul a:visited {
  color: #a0a0c0;
}

.AccountNavigation ul a:hover {
  color: #ffffff;
  text-decoration: none;
}


/* ---- Main Navigation ---- */

.MainNavigation {
  background-color: #16213e;
  padding: 0 2rem;
}

.MainNavigation ul {
  display: flex;
  gap: 0;
  transform: none;
  padding: 0;
}

.MainNavigation ul li {
  float: none;
  transform: none;
  font-size: 0.95rem;
  padding: 0.55rem 1.2rem;
  text-transform: none;
  font-weight: 500;
  background: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}

.MainNavigation ul li div.FixTransform {
  transform: none;
}

.MainNavigation ul li.tab-active {
  border-bottom-color: #7c83db;
  background-color: rgba(124, 131, 219, 0.1);
}

.MainNavigation ul a:link,
.MainNavigation ul a:visited {
  color: #b0b0d0;
}

.MainNavigation ul a:hover {
  color: #ffffff;
  text-decoration: none;
}

.MainNavigation ul li.tab-active a:link,
.MainNavigation ul li.tab-active a:visited {
  color: #e0e0ff;
}

.MainNavigation .anchor {
  display: none;
}


/* ---- Content Area ---- */

.Content {
  flex: 1;
  position: relative;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

#ContentBody {
  padding: 0;
}


/* ---- Sub-Header (project name, etc.) ---- */

#SubHeader {
  padding: 0 0 1rem 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1rem;
}

#SubHeader .PrimaryInformation {
  float: none;
  margin: 0;
}

#SubHeader .PrimaryInformation h1 {
  font-size: 1.6rem;
  color: #1a1a2e;
}

#SubHeader .PrimaryInformation h2 {
  font-size: 1.1rem;
  color: #666;
  font-weight: 400;
}


/* ---- Sub-Content Layout (sidebar + main) ---- */

#SubContent {
  display: flex;
  gap: 2rem;
  clear: both;
  padding-top: 0;
}


/* ---- Sidebar Navigation (Triage / Worklog / Categories tabs) ---- */

.SubNavigation {
  float: none;
  width: 180px;
  min-width: 180px;
}

.SubNavigation ul {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.SubNavigation ul li {
  font-size: 0.95rem;
  color: #1a1a2e;
  text-align: left;
  padding: 0.45rem 0.8rem;
  text-transform: none;
  border-radius: 0.3rem;
  transition: background-color 0.15s;
}

.SubNavigation ul li:hover {
  background-color: #e8e8f4;
  border-radius: 0.3rem;
}

.SubNavigation ul li.selected {
  background-color: #4a5899;
  color: #ffffff;
  border-radius: 0.3rem;
}

.SubNavigation ul li.selected a,
.SubNavigation ul li.selected a:visited {
  color: #ffffff;
}

.SubNavigation a:visited,
.SubNavigation a:link,
.SubNavigation a:hover {
  color: inherit;
  text-decoration: none;
}


/* ---- Content Panel (was RatingContainer) ---- */

.SubNavigated {
  flex: 1;
  padding-left: 0;
  min-width: 0;
}

.SubNavigated .ContentPanel {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 0.4rem;
  padding: 1.2rem 1.5rem;
  min-height: 200px;
}


/* ---- Nested Log (triage + worklog hierarchy display) ---- */

.NestedLog {}

.NestedLog .Date {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a2e;
  padding: 0.6rem 0 0.3rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.4rem;
}

.NestedLog .SubTriage .Category {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.NestedLog .SubTriage .SubTriage {
  padding-left: 1.5rem;
}

.NestedLog .SubTriage .SubTriage .Category {
  font-size: 1rem;
}

.NestedLog .Description {
  padding-left: 1.5rem;
}

.NestedLog .Description > li {
  list-style-type: disc;
  font-size: 0.95rem;
  padding: 0.15rem 0;
  margin-left: 1rem;
}

#WorkLogPage .SubTriage {
  padding-left: 1.5rem;
}


/* ---- Triage Status Colors ---- */

span.Normal {}

span.Urgent {
  background-color: #fff3cd;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  border-left: 3px solid #ffc107;
}

span.Critical {
  background-color: #f8d7da;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  border-left: 3px solid #dc3545;
}

span.Resolved {
  background-color: #e2e3e5;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  color: #666;
  border-left: 3px solid #999;
}

span.UnknownStatus {
  background-color: #d4edda;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  border-left: 3px solid #28a745;
}

span.AdditionalDiscussion {
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  color: #555;
  font-size: 0.9rem;
}


/* ---- Projects List ---- */

#Projects ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

#Projects a {
  font-size: 1rem;
}

#Projects .AddItem {
  padding-top: 1rem;
}

#Projects #AddProject {
  font-weight: 600;
  color: #4a5899;
}

#Projects .SharedHeader {
  margin-top: 1.5rem;
}

.empty-row {
  color: #999;
}


/* ---- Forms ---- */

.FormPage {
  max-width: 480px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.4rem;
  padding: 2rem;
}

.FormPage h2 {
  margin-bottom: 1rem;
  text-align: center;
}

form ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

form ul li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 0.3rem;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: #4a5899;
  box-shadow: 0 0 0 2px rgba(74, 88, 153, 0.15);
}

form textarea {
  min-height: 6rem;
  resize: vertical;
}

form input[type="submit"],
form button[type="submit"] {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  background-color: #4a5899;
  color: #fff;
  border: none;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: background-color 0.15s;
  align-self: flex-start;
  margin-top: 0.5rem;
}

form input[type="submit"]:hover,
form button[type="submit"]:hover {
  background-color: #3a4578;
}

.FormPageFooter {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.errorlist {
  color: #dc3545;
  font-size: 0.85rem;
}

h2.Warning { color: #dc3545; }


/* ---- Add-Item Links ---- */

.NestedLog a,
#Projects a {
  font-size: 0.95rem;
}


/* ---- Map Container (used by settings/timezone) ---- */

#MapContainer {
  padding: 0 0 1rem 0;
}

#MapContainer #map_canvas {
  display: block;
  height: 200px;
  width: 100%;
  border-radius: 0.3rem;
}


/* ---- About Page ---- */

#AboutPage {
  max-width: 640px;
  margin: 0 auto;
}

#AboutPage h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

#AboutPage p {
  font-size: 1rem;
  margin: 0.6rem 0;
  color: #444;
  line-height: 1.6;
}


/* ---- Tables ---- */

table.DataTable {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table.DataTable th {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 2px solid #ddd;
}

table.DataTable td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #eee;
}

table.DataTable .empty-row td {
  color: #999;
}

table.DataTable .action-btn {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
}

table.DataTable .action-group {
  display: inline;
}

table.DataTable .accept-btn,
table.DataTable .decline-btn {
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
}

table.DataTable .accept-btn {
  margin-right: 0.3rem;
}


/* ---- Success Message ---- */

.SuccessMessage {
  margin: 1rem 0;
  padding: 0.6rem 1rem;
  background-color: #d4edda;
  border-radius: 0.3rem;
}


/* ---- Invite Banner ---- */

.InviteBanner {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 0.3rem;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.InviteBanner a {
  font-weight: 600;
  margin-left: 0.5rem;
}


/* ---- Footer ---- */

#Footer {
  text-align: center;
  padding: 1.5rem 0;
  color: #999;
  font-size: 0.8rem;
  clear: both;
}


/* ---- Utility ---- */

.anchor { clear: both; }

img.thumbnail { width: 50px; height: 50px; border-radius: 0.2rem; }

.SubmitForm { cursor: pointer; color: #4a5899; }

.InviteMessage {
  display: block;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}


/* ---- Quick Add Review ---- */

.CategoryLabel {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.CategoryLabel.exact, .CategoryLegend.exact { color: #2e7d32; }
.CategoryLabel.fuzzy, .CategoryLegend.fuzzy { color: #1565c0; }
.CategoryLabel.none,  .CategoryLegend.none  { color: #c62828; font-style: italic; }

.CategoryPopup {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 100;
  min-width: 280px;
}

.CategoryPopup.visible { display: block; }
.CategoryPopup select { width: 100%; margin-bottom: 6px; }

.PopupClose {
  float: right;
  cursor: pointer;
  font-size: 1.2rem;
  color: #999;
  line-height: 1;
  padding: 0 4px;
}

.PopupClose:hover { color: #333; }

.CategoryPopup .NewCategorySection {
  margin-top: 8px;
  border-top: 1px solid #eee;
  padding-top: 8px;
}

.CategoryPopup .NewCategorySection input { width: 70%; }
.CategoryPopup .NewCategorySection select { width: 100%; margin-top: 4px; }
.CategoryPopup button { margin-top: 6px; }

.QuickAddTable td { position: relative; }

.QuickAddWarning {
  color: #c62828;
  font-weight: 500;
  margin: 0.5rem 0;
}

.QuickAddHelp {
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.85rem;
}

.QuickAddHelp ul { margin-left: 1.5rem; }

.QuickAddLegend {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}
