/* Custom styling for ngx-fancyindex file listing - Groupama AM Design */

/* Reset and base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
}

/* Breadcrumbs */
.breadcrumbs {
  margin: 0 0 14px 0;
}

.breadcrumbs__list {
  list-style: none;
  padding: 10px 14px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  color: #2d5016;
  font-size: 13px;
}

.breadcrumbs__item:not(:first-child)::before {
  content: "›";
  color: #9aa3ab;
  margin: 0 6px 0 2px;
}

.breadcrumbs__link {
  color: #2d5016;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs__link:hover {
  color: #1a3509;
  text-decoration: underline;
}

.breadcrumbs__current {
  color: #333;
  font-weight: 600;
}

/* Style the fancyindex table to match Groupama AM design */
#list {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  margin: 0;
  margin-top: 0;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-top: none;
}

/* Table header with dark green background */
#list thead tr {
  background-color: #2d5016 !important;
}

#list thead th {
  font-weight: bold;
  font-size: 14px;
  color: white;
  padding: 16px 20px;
  text-align: left;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hide file size column - showing only 2 columns */
#list thead th:nth-child(2),
#list tbody td:nth-child(2) {
  display: none;
}

#list thead th:first-child {
  width: 70%;
}

#list thead th:last-child {
  width: 30%;
}

/* Table body rows */
#list tbody tr {
  border-top: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
}

#list tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

#list tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

#list tbody tr:hover {
  background-color: #e8f5e9;
  cursor: pointer;
}

/* Table cells */
#list tbody td {
  padding: 16px 20px;
  font-size: 14px;
  color: #333;
  vertical-align: middle;
  border: none;
  white-space: normal;
}

#list tbody td a {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 24px;
  font-weight: normal;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Override any global "ellipsis" truncation coming from external UI CSS */
#list tbody td.link,
#list tbody td:first-child {
  overflow: visible !important;
}

#list tbody td.link a,
#list tbody td:first-child a {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}

#list tbody td a:hover {
  color: #2d5016;
  text-decoration: none;
}

/* Style for directory links - make them bold */
#list tbody td a[href$="/"] {
  font-weight: 600;
  color: #2d5016;
}

/* Style for PDF files */
#list tbody td a[href$=".pdf"] {
  font-weight: normal;
  color: #333;
}

/* Date column */
#list tbody td:nth-child(3) {
  color: #666;
  font-size: 13px;
}

/* Style sorting links in header */
#list thead th a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

#list thead th a:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* Sort icons */
#list thead th a::after {
  content: " ↕";
  font-size: 12px;
  margin-left: 8px;
  opacity: 0.7;
}

/* Container for the table */
.table-scrollable {
  overflow-x: auto;
  background-color: white;
  border-radius: 4px;
  margin: 30px 0;
}

/* Hide path display */
#path {
  display: none !important;
}

/* Style parent directory row - appears as first row in table */
#list tbody tr.parent-directory-row,
#list tbody tr:first-child:has(td a[href="../"]) {
  background-color: #f8f9fa !important;
  border-top: 1px solid #e0e0e0;
}

#list tbody tr.parent-directory-row td.link a,
#list tbody tr.parent-directory-row td a,
#list tbody tr:first-child:has(td a[href="../"]) td.link a,
#list tbody tr:first-child:has(td a[href="../"]) td a {
  font-weight: 600;
  color: #2d5016;
  font-size: 14px;
  text-decoration: none;
}

#list tbody tr.parent-directory-row td.link a:hover,
#list tbody tr.parent-directory-row td a:hover,
#list tbody tr:first-child:has(td a[href="../"]) td.link a:hover,
#list tbody tr:first-child:has(td a[href="../"]) td a:hover {
  color: #1a3509;
  text-decoration: underline;
}

#list tbody tr.parent-directory-row:hover,
#list tbody tr:first-child:has(td a[href="../"]):hover {
  background-color: #e8f5e9 !important;
}

#list tbody tr.parent-directory-row td.size,
#list tbody tr.parent-directory-row td.date,
#list tbody tr:first-child:has(td a[href="../"]) td.size,
#list tbody tr:first-child:has(td a[href="../"]) td.date {
  color: #999;
  font-size: 13px;
}

/* Ensure proper spacing */
#list tbody td:first-child {
  padding-left: 20px;
}

/* Remove any default borders */
#list tbody td:last-child {
  border-right: none;
}

/* Main content section styling */
.m-gam-opc-section {
  background-color: #f5f5f5;
  min-height: calc(100vh - 400px);
}

.gm-content {
  padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #list thead th {
    font-size: 12px;
    padding: 12px 15px;
  }

  #list tbody td {
    font-size: 13px;
    padding: 12px 15px;
  }
}
