/* ========================================
   LAUNCHES PAGE - Professional Design
   Light Theme Default
   ======================================== */

/* Page Container */
.updates-page {
  background: #ffffff;
  color: #000;
  min-height: 100vh;
}

/* Hero Banner Section */
.hero-section {
  position: relative;
  width: 100%;
  height: clamp(360px, 40vw, 500px);
  overflow: hidden;
  margin-bottom: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 1;
}

.hero-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right;
}

.hero-section .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 900px;
  width: 90%;
  z-index: 1;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-content h1 i {
  color: #fff;
}

.hero-description {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.hero-credit {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  z-index: 1;
  pointer-events: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-credit a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-credit a:hover {
  color: rgba(255, 255, 255, 1);
}

.hero-credit .sep {
  margin: 0 8px;
}

.hero-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.hero-features li {
  font-size: 1rem;
  color: #444;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-features li i {
  color: #000;
  font-size: 1.1rem;
  width: 20px;
}

/* ===========================
   FILTER SECTION
   =========================== */
.filter-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.filter-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.7rem;
  justify-content: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #000;
  background: #f5f5f5;
}

.filter-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.filter-btn i {
  font-size: 0.9rem;
}

/* ===========================
   TABLE SECTION
   =========================== */
.table-section {
  margin-top: 2rem;
}

.table-container {
  background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
  border: 2px solid  #e0e0e0;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.table-container:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* DataTables Customization */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.left-controls-wrapper {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.dataTables_length {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

.dataTables_length select {
  padding: 0.4rem 2rem 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  cursor: pointer;
}

.dataTables_filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dataTables_filter input {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  width: 250px;
}

.dataTables_filter input:focus {
  outline: none;
  border-color: #000;
}

/* Timezone Toggle */
.timezone-toggle-container {
  display: flex;
  align-items: center;
}

.timezone-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  user-select: none;
}

.timezone-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #000;
}

.timezone-label-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

/* Table Styling */
#launchDataTable {
  width: 100% !important;
  border-collapse: collapse;
}

#launchDataTable thead th {
  background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
  border-bottom: 2px solid #000;
  padding: 1.1rem 2.5rem 1.1rem 0.85rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.92rem;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: normal;
  line-height: 1.3;
  position: relative;
}

#launchDataTable tbody td {
  padding: 1.1rem 0.85rem;
  border-bottom: 1px solid #e8e8e8;
  color: #2c2c2c;
  font-size: 0.95rem;
  vertical-align: middle;
}

#launchDataTable tbody tr {
  transition: all 0.2s ease;
}

#launchDataTable tbody tr:hover {
  background: linear-gradient(to right, #f9f9f9 0%, #ffffff 100%);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-scheduled {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #0d47a1;
  border: 1px solid #90caf9;
}

.status-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
  border: 1px solid #81c784;
}

.status-scrubbed,
.status-delayed {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  border: 1px solid #ffb74d;
}

.status-failure {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #b71c1c;
  border: 1px solid #ef5350;
}

/* Details Control Column */
.details-control {
  cursor: pointer;
  width: 30px;
  text-align: center;
  color: #666;
}

.details-control:hover {
  color: #000;
}

.details-control i {
  transition: transform 0.1s ease;
}

.details-control-header {
  width: 10px !important;
  min-width: 10px !important;
  max-width: 10px !important;
}

/* Column Width Control */
#launchDataTable thead th:nth-child(1),
#launchDataTable tbody td:nth-child(1) {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
}

#launchDataTable thead th:nth-child(2),
#launchDataTable tbody td:nth-child(2) {
  width: 100px;
  min-width: 100px;
  white-space: nowrap;
}

#launchDataTable thead th:nth-child(3),
#launchDataTable tbody td:nth-child(3) {
  width: 100px;
  min-width: 100px;
  white-space: nowrap;
}

/* NAIF ID Styling */
.naif-id {
  font-weight: 600;
  color: #000;
}

/* Detail Row Styling */
#launchDataTable tbody td.child {
  padding: 0 !important;
  background: transparent !important;
  width: 100% !important;
}

#launchDataTable tbody tr.child {
  background: transparent !important;
  width: 100% !important;
}

#launchDataTable tbody tr.child ul.dtr-details {
  width: 100%;
}

#launchDataTable tbody tr.child td {
  padding: 0 !important;
  width: 100% !important;
}

.detail-container {
  padding: 1.75rem;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  border-radius: 8px;
  display: block;
  width: 100%;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  overflow: visible;
}

.detail-section {
  width: 100%;
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.75rem;
  box-sizing: border-box;
  overflow: visible;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h4 {
  margin: 0 0 1.1rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #000;
  border-bottom: 2px solid #000;
  padding-bottom: 0.6rem;
  letter-spacing: 0.3px;
  word-wrap: break-word;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  box-sizing: border-box;
  table-layout: auto;
  min-width: 400px;
}

.detail-table th {
  text-align: left;
  padding: 0.75rem 2rem 0.75rem 0;
  font-weight: 600;
  color: #555;
  font-size: 0.88rem;
  white-space: normal;
  vertical-align: top;
  word-wrap: break-word;
  width: 50px;
  max-width: 50px;
}

.detail-table td {
  padding: 0.75rem 0 0.75rem 1rem;
  color: #000;
  font-weight: 500;
  font-size: 0.9rem;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  box-sizing: border-box;
  width: auto;
  line-height: 1.5;
}

.detail-table tr {
  border-bottom: 1px solid #e0e0e0;
}

.detail-table tr:last-child {
  border-bottom: none;
}

/* DataTables Info and Pagination */
.dataTables_info {
  padding-top: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.dataTables_paginate {
  padding-top: 1rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.paginate_button {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
}

.paginate_button:hover {
  background: #f5f5f5;
  border-color: #000;
}

.paginate_button.current {
  background: #000;
  color: #fff;
  border-color: #000;
}

.paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Data Source Note */
.data-source-note {
  margin-top: 1.75rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-left: 4px solid #000;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.data-source-note i {
  margin-right: 0.6rem;
  color: #000;
  font-size: 1rem;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE BREAKPOINTS
   ======================================== */

@media (max-width: 1499px) {
  .filter-buttons {
    gap: 0.6rem;
  }
  
  .filter-btn {
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 1199px) {
  .filter-buttons {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .filter-btn {
    padding: 0.65rem 0.9rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 991px) {
  .filter-buttons {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .filter-btn {
    padding: 0.6rem 0.85rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 768px) {
  .data-page-container {
    padding: 1.5rem 1rem 3rem;
  }
  
  .hero-section {
    height: clamp(300px, 50vw, 400px);
  }
  
  .hero-content h1 {
    font-size: 1.9rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-credit {
    font-size: 0.65rem;
    bottom: 8px;
    right: 8px;
  }
  
  .hero-credit .sep {
    display: none;
  }
  
  .hero-credit span:last-child {
    display: none;
  }
  
  .filter-buttons {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .filter-btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
  }
  
  .table-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .left-controls-wrapper {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .dataTables_filter input {
    width: 100%;
  }
  
  .table-container {
    padding: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  #launchDataTable {
    font-size: 0.85rem;
    min-width: 700px;
  }
  
  #launchDataTable thead th,
  #launchDataTable tbody td {
    padding: 0.85rem 2rem 0.85rem 0.6rem;
    font-size: 0.82rem;
  }
  
  #launchDataTable thead th {
    white-space: normal;
  }
  
  .detail-container {
    padding: 1rem;
  }
  
  .detail-section h4 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: clamp(280px, 60vw, 360px);
  }
  
  .hero-content {
    width: 95%;
    padding: 0 0.5rem;
  }
  
  .hero-content h1 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .hero-credit {
    font-size: 0.6rem;
  }
  
  .filter-btn {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.5rem 0.6rem;
  }
  
  #launchDataTable {
    font-size: 0.8rem;
  }
  
  #launchDataTable thead th,
  #launchDataTable tbody td {
    padding: 0.75rem 0.5rem;
  }
  
  .table-container {
    padding: 0.5rem;
    border-radius: 6px;
  }
  
  .status-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
  /* Page Background */
  .updates-page {
    background: #0a0a0a;
    color: #e0e0e0;
  }
  
  /* Hero Features */
  .hero-features li {
    color: #999;
  }
  
  .hero-features li i {
    color: #fff;
  }
  
  /* Status Badges - Dark Theme */
  .status-scheduled {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #90caf9;
    border-color: #1976d2;
  }
  
  .status-success {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: #a5d6a7;
    border-color: #388e3c;
  }
  
  .status-scrubbed,
  .status-delayed {
    background: linear-gradient(135deg, #e65100 0%, #f57c00 100%);
    color: #ffcc80;
    border-color: #ff9800;
  }
  
  .status-failure {
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 100%);
    color: #ef9a9a;
    border-color: #e53935;
  }
  
  /* Filter Section */
  .filter-section {
    border-bottom-color: #333;
  }
  
  .filter-btn {
    background: #1a1a1a;
    border-color: #333;
    color: #ccc;
  }
  
  .filter-btn:hover {
    border-color: #fff;
    background: #222;
  }
  
  .filter-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
  }
  
  /* Table Container */
  .table-container {
    background: linear-gradient(to bottom, #1a1a1a 0%, #0f0f0f 100%);
    border-color: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .table-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }
  
  /* DataTables Controls */
  .dataTables_length,
  .dataTables_filter {
    color: #b0b0b0;
  }
  
  .dataTables_length select,
  .dataTables_filter input {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #e0e0e0;
  }
  
  .dataTables_filter input:focus {
    border-color: #fff;
  }
  
  /* Timezone Toggle */
  .timezone-toggle-label {
    color: #b0b0b0;
  }
  
  .timezone-checkbox {
    accent-color: #fff;
  }
  
  /* Table Headers and Rows */
  #launchDataTable thead th,
  #orbitDataTable thead th {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #fff;
    border-bottom-color: #fff;
  }
  
  #launchDataTable tbody td,
  #orbitDataTable tbody td {
    color: #ccc;
    border-bottom-color: #2a2a2a;
  }
  
  #launchDataTable tbody tr:hover,
  #orbitDataTable tbody tr:hover {
    background: linear-gradient(to right, #222 0%, #2a2a2a 100%);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
  }
  
  /* Details Control */
  .details-control {
    color: #999;
  }
  
  .details-control:hover {
    color: #fff;
  }
  
  /* NAIF ID */
  .naif-id {
    color: #fff;
  }
  
  /* Detail Sections */
  .detail-container {
    background: linear-gradient(to bottom, #1a1a1a 0%, #0f0f0f 100%);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  .detail-section {
    background: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  
  .detail-section h4 {
    color: #fff;
    border-bottom-color: #fff;
  }
  
  .detail-table th {
    color: #888;
  }
  
  .detail-table td {
    color: #e0e0e0;
  }
  
  .detail-table tr {
    border-bottom-color: #2a2a2a;
  }
  
  /* Pagination */
  .dataTables_info {
    color: #888;
  }
  
  .paginate_button {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #b0b0b0;
  }
  
  .paginate_button:hover {
    background: #2a2a2a;
    border-color: #fff;
  }
  
  .paginate_button.current {
    background: #fff;
    color: #000;
    border-color: #fff;
  }
  
  /* Data Source Note */
  .data-source-note {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-left-color: #fff;
    color: #888;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  
  .data-source-note i {
    color: #fff;
  }
  
  /* Ad Container */
  .ad-container {
    background-color: #1a1a1a;
    border-color: #2a2a2a;
  }
  
  .ad-label {
    color: #666;
  }
  
  /* Ad Sidebar Responsive - Dark Mode */
  .updates-page-wrapper {
    background: transparent;
  }
}

/* ========================================
   AD SIDEBAR STYLING - DUAL AD UNIT SYSTEM
   Same as updates page
   ======================================== */

/* Page wrapper for three-column layout */
.updates-page-wrapper {
  width: 100%;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 4rem;
  box-sizing: border-box;
}

.updates-container {
  flex: 0 0 auto;
  max-width: 1200px;
  width: 100%;
}

/* Ad sidebar styling */
.ad-sidebar {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2rem;
  align-self: stretch;
}

.ad-container {
  position: sticky;
  top: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  padding: 8px;
  margin: 0;
  background-color: #fafafa;
}

.ad-label {
  font-size: 0.7rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  font-weight: 500;
  text-align: center;
}

.ad-unit {
  display: flex;
  justify-content: center;
}

.ad-160 {
  display: none;
}

/* Responsive breakpoints */
@media (min-width: 1920px) {
  .updates-page-wrapper {
    padding: 2rem 2rem 4rem;
    gap: 2rem;
  }
  
  .updates-container {
    max-width: 1200px;
  }
  
  .ad-sidebar {
    flex: 1 1 300px;
    min-width: 300px;
  }
}

@media (min-width: 1885px) and (max-width: 1919px) {
  .updates-page-wrapper {
    padding: 2rem 1.5rem 4rem;
    gap: 1.5rem;
  }
  
  .updates-container {
    max-width: 1200px;
  }
  
  .ad-sidebar {
    flex: 1 1 300px;
    min-width: 300px;
  }
}

@media (min-width: 1500px) and (max-width: 1885px) {
  .updates-page-wrapper {
    padding: 2rem 1rem 4rem;
    gap: 1rem;
  }
  
  .updates-container {
    max-width: 1200px;
  }
  
  .ad-sidebar {
    flex: 1 1 160px;
    min-width: 160px;
  }
  
  .ad-300 {
    display: none;
  }
  
  .ad-160 {
    display: block;
  }
}

@media (min-width: 1200px) and (max-width: 1499px) {
  .updates-page-wrapper {
    padding: 2rem 1rem 4rem;
    gap: 1rem;
  }
  
  .updates-container {
    max-width: clamp(800px, calc(100vw - 380px), 1100px);
  }
  
  .ad-sidebar {
    flex: 1 1 160px;
    min-width: 160px;
  }
  
  .ad-300 {
    display: none;
  }
  
  .ad-160 {
    display: block;
  }
  
  .filter-buttons {
    flex-wrap: wrap;
  }
}

@media (max-width: 1199px) {
  .updates-page-wrapper {
    justify-content: center;
    padding: 2rem 1.5rem 4rem;
  }
  
  .ad-sidebar {
    display: none;
  }
  
  .updates-container {
    max-width: clamp(600px, 95vw, 1100px);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .updates-page-wrapper {
    padding: 2rem 1.5rem 4rem;
  }
  
  .updates-container {
    max-width: clamp(600px, 90vw, 1000px);
  }
}

@media (max-width: 767px) {
  .updates-page-wrapper {
    padding: 1.5rem 1rem 3rem;
  }
  
  .updates-container {
    max-width: 100%;
  }
}
