/* ==========================================================================
   CBSE PUBLIC DISCLOSURE RESPONSIVE STYLES (cbse-disclosure.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BASE / DESKTOP STYLES (1200px and up)
   -------------------------------------------------------------------------- */

/* Main Container Padding */
.cbse-disclosure-content {
  background-color: #ffffff;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid #e9ecef;
}

/* Headings */
.cbse-disclosure-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d6efd;
  padding-bottom: 0.5rem;
  margin-top: 2.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e9ecef;
  position: relative;
}

.cbse-disclosure-content h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: #0d6efd;
}

.cbse-disclosure-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #212529;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* Table Wrapper & Table Formatting */
.cbse-disclosure-content figure.wp-block-table,
.cbse-disclosure-content .table-responsive {
  display: block;
  width: 100%;
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  border: 1px solid #dee2e6;
}

.cbse-disclosure-content table {
  width: 100%;
  margin-bottom: 0;
  color: #212529;
  vertical-align: middle;
  border-collapse: collapse;
}

.cbse-disclosure-content table th {
  background-color: #f8f9fa;
  color: #495057;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.cbse-disclosure-content table td {
  padding: 1rem;
  font-size: 0.925rem;
  border-bottom: 1px solid #e9ecef;
}

/* Zebra Striping & Hover */
.cbse-disclosure-content table tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.015);
}

.cbse-disclosure-content table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.03);
}

/* Table Link / PDF Button inside cells */
.cbse-disclosure-content table a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.08);
  border-radius: 50rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cbse-disclosure-content table a:hover {
  background-color: #0d6efd;
  color: #ffffff;
}

/* Gutenberg Standalone File Block */
.cbse-disclosure-content .wp-block-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8f9fa;
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.cbse-disclosure-content .wp-block-file:hover {
  border-color: #0d6efd;
}

.cbse-disclosure-content .wp-block-file a:not(.wp-block-file__button) {
  font-weight: 600;
  color: #212529;
  text-decoration: none;
  font-size: 0.95rem;
}

.cbse-disclosure-content .wp-block-file__button {
  background-color: #0d6efd;
  color: #ffffff;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 50rem;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.cbse-disclosure-content .wp-block-file__button:hover {
  background-color: #0b5ed7;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Force 1st Column ("Sl No.") to Minimal Width
   -------------------------------------------------------------------------- */

/* Target 1st Header and 1st Data Cell of every table */
.cbse-disclosure-content table th:first-child,
.cbse-disclosure-content table td:first-child {
  width: 8%;            /* Forces the browser to collapse the column to fit its contents */
  white-space: nowrap;  /* Prevents the text "Sl No." or numbers from wrapping */
  text-align: center;   /* Centers serial numbers cleanly */
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Optional: Keep the serial number bold and distinct */
.cbse-disclosure-content table td:first-child {
  font-weight: 600;
  color: #495057;
}


/* --------------------------------------------------------------------------
   2. TABLET VIEWPORT (768px to 991.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  
  .cbse-disclosure-content {
    padding: 2rem;
    border-radius: 0.75rem;
  }

  .cbse-hero h1 {
    font-size: 2.1rem;
  }

  .cbse-hero p {
    font-size: 1rem;
  }

  .cbse-disclosure-content h2 {
    font-size: 1.35rem;
    margin-top: 1.75rem;
  }

  .cbse-disclosure-content table {
    min-width: 620px; /* Ensures text won't crush on medium screens */
  }

  .cbse-disclosure-content table th,
  .cbse-disclosure-content table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }

}


/* --------------------------------------------------------------------------
   3. MOBILE VIEWPORT (Under 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {

  /* Reduce hero section padding */
  .cbse-hero {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .cbse-hero h1 {
    font-size: 1.75rem;
  }

  .cbse-hero p {
    font-size: 0.925rem;
  }

  /* Full-width print button on mobile */
  .cbse-hero .no-print button {
    width: 100%;
    justify-content: center;
  }

  /* Compact content wrapper */
  .cbse-disclosure-content {
    padding: 1.25rem;
    border-radius: 0.5rem;
  }

  .cbse-disclosure-content h2 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }

  /* Table Horizontal Scrolling Safeguard */
  .cbse-disclosure-content table {
    min-width: 540px; /* Forces touch scroll instead of squishing columns */
  }

  .cbse-disclosure-content table th {
    font-size: 0.8rem;
    padding: 0.65rem 0.75rem;
  }

  .cbse-disclosure-content table td {
    font-size: 0.825rem;
    padding: 0.65rem 0.75rem;
  }

  .cbse-disclosure-content table a {
    padding: 0.25rem 0.65rem;
    font-size: 0.775rem;
  }

  /* Stack File Blocks Vertically on Mobile */
  .cbse-disclosure-content .wp-block-file {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
  }

  .cbse-disclosure-content .wp-block-file__button {
    width: 100%;
    text-align: center;
  }
}


/* --------------------------------------------------------------------------
   4. PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  header, 
  footer, 
  nav,
  .no-print,
  .alert,
  .cbse-hero .badge,
  .cbse-hero p,
  .text-center.mt-4 {
    display: none !important;
  }

  body, 
  main, 
  .cbse-hero, 
  .cbse-disclosure-content {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .cbse-hero {
    padding-bottom: 1rem !important;
  }

  .cbse-hero h1 {
    font-size: 1.75rem !important;
    color: #000000 !important;
  }

  .cbse-disclosure-content figure.wp-block-table,
  .cbse-disclosure-content .table-responsive {
    border: 1px solid #000000 !important;
    margin-bottom: 1.5rem !important;
    page-break-inside: avoid;
    overflow: visible !important;
  }

  .cbse-disclosure-content table {
    min-width: 100% !important;
    width: 100% !important;
  }

  .cbse-disclosure-content table th {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cbse-disclosure-content table td, 
  .cbse-disclosure-content table th {
    padding: 6pt 8pt !important;
    font-size: 9pt !important;
    border: 1px solid #cccccc !important;
  }

  .cbse-disclosure-content table a,
  .cbse-disclosure-content .wp-block-file__button {
    background: none !important;
    color: #000000 !important;
    padding: 0 !important;
    font-size: 8pt !important;
    text-decoration: underline !important;
  }
}