/*--------------------------------------------------------------
# Documents page (page-documents.php), loaded on that page only
--------------------------------------------------------------*/

/* Short page: stretch the grey section so the footer sits at the bottom of the window, with no white gap under it */
body.page-documents {min-height: 100vh; display: flex; flex-direction: column;}
body.page-documents main {flex: 1 0 auto; display: flex; flex-direction: column;}
body.page-documents .documents-container {flex: 1 0 auto;}

.documents-container {background: #EEF1F0; padding-top: 4em; padding-bottom: 4em; color: #1b1b1b; font-size: 1.1em;}
.documents-intro {margin-bottom: 2em; font-size: 1.1em;}
.documents-intro a {color: #1EA2DC;}
.documents-intro a:hover {color: #1b1b1b;}

.documents-panel {background: #212121; color: #fff; border-radius: 20px; padding: 2em;}

/* Filters */
.documents-filters {display: flex; flex-wrap: wrap; gap: 1em; align-items: flex-end; margin-bottom: 1.5em;}
.documents-filter {display: flex; flex-direction: column; flex: 0 1 160px; min-width: 0;}
.documents-filter-search {flex: 1 1 260px;}
.documents-filter label {text-transform: uppercase; font-weight: bold; font-size: 0.85em; letter-spacing: 0.05em; color: #1EA2DC; margin-bottom: 0.35em;}
.documents-filter input[type="search"],
.documents-filter select {width: 100%; font-family: "Barlow Condensed", sans-serif; font-size: 1em; padding: 0.5em 0.9em; background: #fff; color: #1b1b1b; border: 0; border-radius: 20px; height: 2.5em;}
.documents-filter select {appearance: none; -webkit-appearance: none; padding-right: 2em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231b1b1b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9em center;}
.documents-filter input:focus-visible,
.documents-filter select:focus-visible,
.documents-panel button:focus-visible,
.documents-panel a:focus-visible {outline: 3px solid #1EA2DC; outline-offset: 2px;}
.documents-filter-actions {flex-direction: row; gap: 0.5em; flex: 0 0 auto;}

.documents-reset,
.documents-export {font-family: "Barlow Condensed", sans-serif; font-size: 1em; font-weight: bold; text-transform: uppercase; border-radius: 25px; padding: 0 1.2em; height: 2.5em; cursor: pointer; transition: all 0.2s;}
.documents-reset {background: transparent; color: #fff; border: 2px solid #555;}
.documents-reset:hover {border-color: #fff;}
.documents-export {background: #1EA2DC; color: #fff; border: 2px solid #1EA2DC;}
.documents-export:hover {background: #fff; color: #1EA2DC; border-color: #fff;}

.documents-count {color: #aaa; margin: 0 0 0.5em; font-size: 0.95em;}

/* Table */
.documents-table-wrap {width: 100%;}
.documents-table {width: 100%; border-collapse: collapse; margin: 0;}
.documents-panel > :last-child {margin-bottom: 0;}
.documents-table th {text-align: left; border-bottom: 2px solid #1EA2DC; padding: 0;}
.documents-table th button {background: none; border: 0; padding: 0.6em 0.75em; width: 100%; text-align: left; color: #1EA2DC; font-family: "Barlow Condensed", sans-serif; font-size: 1em; font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; white-space: nowrap;}
.documents-table th button:hover {color: #fff;}
.documents-table th button::after {content: ""; display: inline-block; width: 0.8em; margin-left: 0.35em; opacity: 0.4;}
.documents-table th[aria-sort="none"] button::after {content: "\2195";}
.documents-table th[aria-sort="ascending"] button::after {content: "\2191"; opacity: 1;}
.documents-table th[aria-sort="descending"] button::after {content: "\2193"; opacity: 1;}

.documents-table td {padding: 0.9em 0.75em; border-bottom: 1px solid #3a3a3a; vertical-align: middle;}
.documents-table tbody tr:last-child td {border-bottom: 0;}
.documents-table tbody tr:hover td {background: #2b2b2b;}
.documents-title a {color: #fff; font-weight: 600; font-size: 1.1em;}
.documents-title a:hover {color: #1EA2DC;}
.documents-date {white-space: nowrap;}
.documents-col-size {white-space: nowrap; color: #aaa;}
.documents-col-download {text-align: right; width: 1%;}
.documents-col-download .cta-button {white-space: nowrap; font-size: 0.95em;}

.documents-empty {margin: 1em 0 0; color: #ccc; font-size: 1.1em;}
.documents-panel .screen-reader-text {position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;}

/* Phones: each row becomes a card */
@media (max-width: 767.98px) {
  .documents-panel {padding: 1.25em; border-radius: 16px;}
  .documents-filter {flex: 1 1 calc(50% - 0.5em);}
  .documents-filter-search,
  .documents-filter-actions {flex: 1 1 100%;}
  .documents-filter-actions button {flex: 1;}

  .documents-table thead {position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);}
  .documents-table, .documents-table tbody, .documents-table tr, .documents-table td {display: block; width: 100%;}
  .documents-table tr {padding: 1em 0; border-bottom: 1px solid #3a3a3a;}
  .documents-table tbody tr:last-child {border-bottom: 0;}
  .documents-table td {border: 0; padding: 0.15em 0; display: inline-block; width: auto; margin-right: 0.75em; color: #aaa;}
  .documents-table tbody tr:hover td {background: none;}
  .documents-table td.documents-title {display: block; margin-bottom: 0.3em;}
  .documents-table td.documents-col-download {display: block; text-align: left; margin-top: 0.6em;}
}
