/* =========================
   Protected Content CSS
   Scoped under .protected-content
   Harmonized with base.css
========================= */

/* General page styling */
.protected-content {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fc;  /* match base.css background */
  color: #1b1045;             /* match base.css text color */
  width: 100%;
  min-width:400px;
  line-height: 1.5;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Headings */
.protected-content h1 {
  text-align: center;
  font-size: 1.2em;
  margin-bottom: .5em;
  color: #1b1045;  /* match base.css color palette */
}

.protected-content center {
	margin-bottom: 1.5em
}

/* Buttons inside protected content */
.protected-content input[type="button"] {
  background-color: #ce0c88;
  border: none;
  color: white;
  padding: 8px 14px;
  margin: 5px 5px 15px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s ease-in-out;
}

.protected-content input[type="button"]:hover {
  background-color: #db1b96;
}

/* Collapse/Expand control buttons */
.protected-content input.view-control {
  background-color: #6c757d; 
  border: none;
  color: white;
  padding: 6px 12px;
  margin: 5px 5px 15px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background-color 0.2s ease-in-out;
}

.protected-content input.view-control:hover {
  background-color: #5a6268; 
}

/* Section dividers */
.protected-content hr {
	display: none;
}

/* Outer pairing tables */
.protected-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2px;
  font-size: 0.9em;
}

.protected-content td {
  padding: 3px 8px;
  vertical-align: top;
}

/* Flight header row */
.protected-content td a.XLINK {
  font-weight: bold;
  color: #1a3d7c;
  text-decoration: none;
}

.protected-content td a.XLINK:hover {
  text-decoration: underline;
}

/* Flight header row */
td a.XLINK {
  font-weight: bold;
  color: #1a3d7c;
  text-decoration: none;
}

td a.XLINK:hover {
  text-decoration: underline;
}

a.YLINK {
  color: #0d6efd;
  font-size: 0.85em;
  text-decoration: none;
}

a.YLINK:hover {
  text-decoration: underline;
}

/* Sub tables inside (flights, crew, etc.) */
table tr.main {
  background-color: #e9f2fb;
  font-weight: bold;
  border-bottom: 2px solid #bbb;
}

/* Bold summary rows (totals) */
tr.bold {
  background-color: #f1f5f9;
  font-weight: bold;
  border-top: 2px solid #ccc;
}

/* Crew section */
td strong {
  color: #444;
}

table tr td[colspan="4"] table {
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 2px;
}

table tr td[colspan="4"] table td {
  padding: 2px 6px;
}

/* Card wrapper */
.pairing-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  margin-bottom: 16px;
  overflow: hidden;  /* so header + table align nicely */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Table content only has padding when expanded */
.pairing-card:not(.collapsed) table {
  padding: 8px 12px;
}

/* Put padding only on the table area */
.pairing-card table {
  padding: 2px 4px;
}

/* Collapsed cards hide their table */
.pairing-card.collapsed table {
  display: none;
}

/* Thinner card header */
.card-header {
  cursor: pointer;
  padding: 4px 8px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 500;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  user-select: none;
  line-height: 1.2;    /* compress vertical height */
  justify-content: space-between; /* push content to edges */
}

.card-header .header-left {
  display: flex;
  align-items: center; /* keep arrow, pairing info, and text aligned */
  gap: 8px; /* optional spacing between elements */
}

.card-header .header-left ::before {
  content: "▼";
  font-size: 0.7em;
  transition: transform 0.2s ease;
  color: #555;
  margin-right: 4px;
}

.pairing-card.collapsed .card-header::before {
  transform: rotate(-90deg);
}

/* Optional hover highlight */
.card-header:hover {
  background: #edf2f7;
}

.sort-active {
  font-weight: bold;
  background-color: #0f5ac6 !important;
}

/* Collapse/Expand control buttons */
input.view-control {
  background-color: #6c757d;   /* neutral gray */
  border: none;
  color: white;
  padding: 6px 12px;
  margin: 5px 5px 15px 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: background-color 0.2s ease-in-out;
}

input.view-control:hover {
  background-color: #5a6268;   /* darker gray on hover */
}

.clipboard-icon {
	cursor: pointer;
}