

:root {
  --vdot-blue: #0B3C5D;
  --vdot-blue-dark: #072B43;
  --vdot-orange: #d14124;
  --vdot-orange-dark: #b3361d;
  --vdot-gray-dark: #333333;
  --vdot-gray: #666666;
  --vdot-gray-light: #f5f5f5;
  --vdot-gray-border: #dddddd;
  --vdot-white: #ffffff;
  --vdot-font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --vdot-font-size: 13px;
  --vdot-line-height: 1.3;
  --vdot-spacing-xs: 6px;
  --vdot-spacing-sm: 8px;
  --vdot-spacing-md: 12px;
  --vdot-spacing-lg: 16px;
  --vdot-spacing-xl: 20px;
  --vdot-border-radius: 3px;
  --vdot-border: 1px solid var(--vdot-gray-border);
  --vdot-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --vdot-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ================= FILTER BAR ================= */

.filter-bar {
  display: flex;
  gap: var(--vdot-spacing-md);
  margin-bottom: var(--vdot-spacing-lg);
  margin-top: 0;
  align-items: center;
  flex-wrap: nowrap;
  padding: var(--vdot-spacing-md);
  background: var(--vdot-white);
  border-radius: var(--vdot-border-radius);
  box-shadow: var(--vdot-shadow);
  border: var(--vdot-border);
  font-family: var(--vdot-font-family);
}

#btnSearch:focus,
#btnReset:focus,
.download-link:focus,
.btn-view:focus,
#btnSearch:hover,
#btnReset:hover,

.btn-view:hover {
  outline: 3px solid #0B3C5D;
  outline-offset: 2px;
  background: #072B43 !important;
  color: #ffffff !important;
}

thead tr:hover {
  cursor: default !important;
  background: var(--vdot-blue) !important;
}

.filter-bar select,
.filter-bar input {
  padding: var(--vdot-spacing-sm) var(--vdot-spacing-md);
  border-radius: var(--vdot-border-radius);
  border: 1px solid var(--vdot-gray-border);
  font-size: var(--vdot-font-size);
  font-family: var(--vdot-font-family);
  font-weight: 400;
  background: var(--vdot-white);
  color: var(--vdot-gray-dark);
  transition: all 0.2s ease;
  line-height: var(--vdot-line-height);
  height: 36px;
}

.filter-bar select:focus,
.filter-bar input:focus {
  outline: 2px solid #005EB8;
  outline-offset: 2px;
  border-color: #005EB8;
  box-shadow: none;
}

.filter-bar select {
  min-width: 180px;
  max-width: 370px;
  width: 100%;
  padding-right: 35px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23005eb8' d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.filter-bar select option {
  max-width: 370px;
  overflow: hidden;
}

.filter-bar input {
  min-width: 250px;
  max-width: 40%;
  width: 100%;
  flex-grow: 1;
  padding-right: 35px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M11.7 10.3l3.3 3.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-3.3-3.3C9.1 12.2 8.1 12.5 7 12.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5c0 1.1-.4 2.1-1 2.8zM7 11c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* ================= TABLE ================= */

table {
  width: 100%;
  border-collapse: collapse !important;
  font-size: var(--vdot-font-size);
  background: var(--vdot-white);
  border-radius: var(--vdot-border-radius);
  overflow: visible;
  box-shadow: var(--vdot-shadow);
  font-family: var(--vdot-font-family);
  margin-bottom: var(--vdot-spacing-lg);
}

p {
  color: var(--vdot-blue);
  font-size: 13px;
}

th {
  background: var(--vdot-blue);
  color: var(--vdot-white);
  text-align: left;
  padding: var(--vdot-spacing-sm) var(--vdot-spacing-md);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--vdot-orange);
  height: 36px;
  white-space: nowrap;
  border-right: none !important;
  border-left: none !important;
}

td {
  padding: var(--vdot-spacing-sm) var(--vdot-spacing-md);
  border-bottom: 1px solid var(--vdot-gray-border);
  border-right: none !important;
  border-left: none !important;
  color: var(--vdot-gray-dark);
  line-height: var(--vdot-line-height);
  height: 32px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td.action-column {
  overflow: visible !important;
}

tr:hover {
  background: rgba(0, 94, 184, 0.05);
  transition: background-color 0.2s ease;
}

.btn-view {
  padding: 4px 10px;
  background: var(--vdot-blue);
  color: var(--vdot-white);
  border: none;
  border-radius: var(--vdot-border-radius);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
  font-family: var(--vdot-font-family);
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
  height: 24px;
}

.btn-view:hover {
  //background: var(--vdot-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--vdot-shadow);
}

.action-column {
  text-align: center;
  width: 120px;
}

.no-file {
  background: var(--vdot-gray) !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.download-link {
  color: var(--vdot-white);
  text-decoration: none;
  display: inline-block;
  width: 100%;
  height: 100%;
}

.download-link:hover {
  color: var(--vdot-white);
  text-decoration: none;
}

/* ================= EXPANDABLE ROW ================= */

.expand-row {
  display: none;
  background: white !important;
}

.expand-cell {
  padding: 0 !important;
  background: #f5f5f5;
}

.expand-content-box {
  border-left: 4px solid var(--vdot-blue);
  background: white;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
}

.chevron {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.25s ease;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.chevron:focus {
  outline: 2px solid var(--vdot-blue);
  outline-offset: 2px;
}

.chevron.expanded {
  transform: rotate(90deg);
}

.selected-row {
  background: rgba(0, 94, 184, 0.15) !important;
}

.pagination-ellipsis {
  font-weight: bold;
  opacity: 0.6;
  user-select: none;
}

.btn-view.active {
  background: var(--vdot-orange);
  cursor: default;
}

.btn-view:hover {
  color: #0B3C5D;
}

/* ================= TOP TOOLTIP ================= */

.vdot-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.vdot-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 99999;
}

.vdot-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}

.vdot-tooltip-wrapper:hover .vdot-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.vdot-tooltip {
  z-index: 10000;
}

/* ================= MISC CLASSES ================= */

.classname { margin-left: 10px; }
.classreset { margin-left: 6px; }
.classaction { text-align: center; }
.classfilename { font-weight: 600; color: var(--vdot-blue); }

.classpagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.expand-arrow-cell,
.expand-arrow-header {
  width: 80px;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
  overflow: visible !important;
}


.hidden-details[hidden] {
  display: none !important;
}

.navbar,
.navbar-expand-xl,
.footer-bottom {
  display: none !important;
}

/* ================= MAIN CONTENT TOP SPACING ================= */

main#mainContent {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.wrapper-body,
.container,
.container-fluid,
.wrapper-body .container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ================================================= */
/* =================== MODAL ======================= */
/* ================================================= */

.formmodal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.classpageoverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
}

.modal-card {
  background: #fff;
  width: min(660px, 95vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 12px;
  padding: 28px 32px 24px 32px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.details-box:focus {
    outline: 3px solid #0B3C5D;
    outline-offset: 2px;
}
/* Modal title */
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 0 0 20px 0;
  font-family: var(--vdot-font-family);
}

/* Close button */
.classformbutton {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  font-size: 22px;
  font-weight: 300;
  color: #555;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  z-index: 10;
}

.classformbutton:hover {
  color: #111;
  opacity: 1;
}

.classformbutton:focus {
  outline: 3px solid #0B3C5D;
  outline-offset: 2px;
  border-radius: 4px;
}
/* ================= DETAILS FORM (MODAL CONTENT) ================= */

.details-form {
  background: transparent;
  padding: 0;
}

.details-form-inner {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.details-row {
  display: contents;
}

/* Each field row: label on left, box on right */
.details-col,
.details-description-wrapper,
.details-document-wrapper {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  width: 100% !important;
  min-width: 0;
  border-bottom: none;
}

/* Label — fixed width on the left */
.details-label {
  font-size: 13px;
  font-weight: 500;
  color: #0B3C5D;
  flex-shrink: 0;
  margin: 0;
  line-height: 1.4;
  text-align: left;
  padding-top: 0;
}

/* Value box — gray rounded input-like container */
.details-box {
  flex: 1;
  background: #f3f2f1;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #333;
  min-height: 36px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  display: flex;
  align-items: center;
}

/* Scrollable description box */
.details-description-box {
  min-height: 80px;
  max-height: 80px;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: flex-start;
}

.details-description-box::-webkit-scrollbar { width: 8px; }
.details-description-box::-webkit-scrollbar-track { background: #e5e5e5; border-radius: 10px; }
.details-description-box::-webkit-scrollbar-thumb { background: #0B3C5D; border-radius: 10px; }
.details-description-box::-webkit-scrollbar-thumb:hover { background: #072B43; }

.details-document-box {
  min-height: 36px;
}

/* Mobile — stack label above box */
@media (max-width: 576px) {
  .details-col,
  .details-description-wrapper,
  .details-document-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .details-description-wrapper .details-label,
  .details-document-wrapper .details-label {
    padding-top: 0;
  }

  .details-label {
    min-width: unset;
    max-width: unset;
    text-align: left;
    font-weight: 600;
    color: #0B3C5D;
    font-size: 12px;
  }

  .details-box {
    width: 100%;
  }
}

/* ================= LINKS ================= */

.file-name-container {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  min-height: auto !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
}

.file-name-container a {
  color: #4da3ff !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.file-name-container a:hover { color: #d14124 !important; }

.download-link-inline {
  color: #5b9bd5;
  text-decoration: underline;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
}

.download-link-inline:hover { color: #0B3C5D;}

.download-link-inline:focus {
  outline: 2px solid #0B3C5D;
  outline-offset: 2px;
  background: transparent !important;
  color: #0B3C5D !important;
  border-radius: 2px;
}

/* ================================================= */
/* =============== MOBILE (≤ 576px) ================ */
/* ================================================= */

@media (max-width: 576px) {

  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .filter-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px;
    padding: 8px;
    margin-top: 0 !important;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100%;
    height: 34px;
    font-size: 12px;
  }

  .filter-bar button {
    flex: 0 0 48%;
    max-width: 48%;
    height: 32px;
    font-size: 12px;
    padding: 4px 8px;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .wrapper-body,
  .container,
  .container-fluid,
  .wrapper-body .container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse;
    overflow-x: hidden !important;
    white-space: normal !important;
  }

  thead, tbody { display: table-row-group; }
  tr { display: table-row; }

  th {
    white-space: nowrap !important;
    font-size: 12px;
  }

  th, td {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    max-width: none !important;
    font-size: 12px;
    line-height: 1.3;
  }

  table th:nth-child(1), table td:nth-child(1) { width: 25% !important; min-width: 70px !important; text-align: left; }
  table th:nth-child(2), table td:nth-child(2) { width: 25% !important; }
  table th:nth-child(3), table td:nth-child(3) { display: none !important; }
  table th:nth-child(4), table td:nth-child(4) { width: 25% !important; min-width: 85px !important; text-align: center; white-space: nowrap !important; }
  table th:nth-child(5), table td:nth-child(5) { width: 20% !important; min-width: 60px !important; max-width: 60px !important; text-align: center; white-space: nowrap !important; overflow: visible !important; }

  .btn-view {
    height: 26px;
    font-size: 11px;
    padding: 2px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .expand-row { display: none; }
  .expand-cell { padding: 0 !important; }

  .expand-content-box {
    border-left: none;
    border-top: 4px solid var(--vdot-blue);
    background: #fff;
    width: 100%;
  }

  .pagination-container > div { flex-wrap: wrap; gap: 6px; }

  /* Modal mobile */
  .modal-card {
    padding: 20px 18px;
    border-radius: 10px;
  }

  .details-col,
  .details-description-wrapper,
  .details-document-wrapper {
    flex-direction: column;
    gap: 2px;
  }

  .details-label {
    min-width: unset;
    font-weight: 600;
    color: #0B3C5D;
    font-size: 12px;
  }
}

/* ================================================= */
/* ================= TABLET (577–1024px) =========== */
/* ================================================= */

@media (min-width: 577px) and (max-width: 1024px) {

  .filter-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px !important;
    margin-top: 0 !important;
  }

  .filter-bar input {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 36px !important;
    font-size: 13px !important;
  }

  .filter-bar select {
    flex: 0 0 calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
    width: auto !important;
    height: 36px !important;
    font-size: 13px !important;
  }

  .filter-bar button {
    flex: 0 0 calc(50% - 4px) !important;
    max-width: calc(50% - 4px) !important;
    height: 36px !important;
    font-size: 13px !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .container,
  .container-fluid,
  .wrapper-body .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  thead,
tbody{
    display:table-row-group !important;
}

table tr{
    width:100% !important;
}
  th, td {
    display: table-cell !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    max-width: none !important;
    font-size: 13px !important;
  }

  th { white-space: nowrap !important; }

  /* Hide Description */
  table th:nth-child(3), table td:nth-child(3) { display: none !important; }

  /* Form Number */
  table th:nth-child(1), table td:nth-child(1) { width: 22% !important; }

  /* Form Name */
  table th:nth-child(2), table td:nth-child(2) { width: auto !important; }

  /* Action */
  table th:nth-child(4), table td:nth-child(4) {
    width: 120px !important;
    min-width: 120px !important;
    text-align: center !important;
    white-space: nowrap !important;
    display: table-cell !important;
    overflow: visible !important;
  }

  /* Details */
  table th:nth-child(5), table td:nth-child(5) {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
    padding-right: 8px !important;
  }

  td.action-column { overflow: visible !important; }

  .chevron { display: inline-block !important; font-size: 18px; cursor: pointer; }

  .expand-cell { padding: 0 !important; width: 100%; }
  .expand-content-box { overflow: hidden !important; }

  .pagination-container > div { flex-wrap: wrap; gap: 6px; }
}
/* Modal tooltip — shows BELOW the link (not above, to avoid modal edge clipping) */
.modal-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.modal-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 100001;
}

.modal-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #111 transparent;
}

.modal-tooltip-wrapper:hover .modal-tooltip {
  opacity: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
