/*
  Cosmology Strip — series navigation stylesheet
  Pairs with /includes/cosmology-strip.php
*/

.cosmology-strip {
  background:
    linear-gradient(180deg, rgba(7, 20, 35, 0.45), rgba(7, 20, 35, 0.20));
  border-bottom: 1px solid rgba(101, 167, 180, 0.10);
  border-top: 1px solid rgba(101, 167, 180, 0.05);
  font-family: 'Cinzel', ui-serif, Georgia, serif;
  position: relative;
  z-index: 20;
}

.cosmology-strip .cs-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 11px clamp(16px, 2.2vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============ TABS ============ */

.cs-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cs-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(101, 167, 180, 0.72);
  font-weight: 600;
  padding-right: 12px;
  border-right: 1px solid rgba(101, 167, 180, 0.18);
  margin-right: 2px;
  line-height: 1.4;
}

.cs-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(232, 235, 225, 0.025);
  border: 1px solid rgba(101, 167, 180, 0.18);
  color: #a4b3bb;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: 'Cinzel', ui-serif, Georgia, serif;
}

.cs-tab:hover {
  color: #f2d27a;
  border-color: rgba(242, 210, 122, 0.4);
  background: rgba(242, 210, 122, 0.05);
}

.cs-tab.is-active {
  color: #f2d27a;
  background: rgba(242, 210, 122, 0.12);
  border-color: rgba(242, 210, 122, 0.45);
  box-shadow: 0 0 0 1px rgba(242, 210, 122, 0.08), 0 2px 14px rgba(242, 210, 122, 0.10);
}

.cs-tab-icon {
  font-size: 14px;
  line-height: 1;
  color: rgba(242, 210, 122, 0.65);
}
.cs-tab.is-active .cs-tab-icon {
  color: #f2d27a;
  text-shadow: 0 0 10px rgba(242, 210, 122, 0.65);
}

.cs-tab-text {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
}

.cs-tab-sub {
  font-family: 'Cormorant Garamond', ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(164, 179, 187, 0.6);
  line-height: 1;
  padding-left: 4px;
  border-left: 1px solid rgba(101, 167, 180, 0.15);
}
.cs-tab.is-active .cs-tab-sub {
  color: rgba(242, 210, 122, 0.7);
  border-left-color: rgba(242, 210, 122, 0.25);
}

/* ============ READING DROPDOWN ============ */

.cs-reading {
  position: relative;
}

.cs-reading summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(43, 122, 146, 0.10);
  border: 1px solid rgba(101, 167, 180, 0.28);
  color: #65a7b4;
  font-family: 'Cinzel', ui-serif, Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.2s ease;
}
.cs-reading summary::-webkit-details-marker { display: none; }
.cs-reading summary::marker { content: ''; }

.cs-reading summary:hover {
  color: #f2d27a;
  border-color: rgba(242, 210, 122, 0.42);
  background: rgba(242, 210, 122, 0.06);
}

.cs-reading[open] summary {
  color: #f2d27a;
  border-color: rgba(242, 210, 122, 0.45);
  background: rgba(242, 210, 122, 0.10);
}

.cs-reading-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(242, 210, 122, 0.18);
  border: 1px solid rgba(242, 210, 122, 0.30);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0;
  color: #f2d27a;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
}

.cs-reading-chev {
  font-size: 11px;
  line-height: 1;
  transition: transform 0.25s ease;
  color: inherit;
  opacity: 0.7;
}
.cs-reading[open] .cs-reading-chev {
  transform: rotate(180deg);
  opacity: 1;
}

.cs-reading-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 340px;
  max-width: min(420px, 92vw);
  z-index: 100;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(11, 31, 51, 0.97), rgba(7, 20, 35, 0.98));
  border: 1px solid rgba(101, 167, 180, 0.30);
  border-radius: 14px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.70),
    0 0 0 1px rgba(232, 235, 225, 0.04) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: cs-reading-in 0.22s ease-out;
}

@keyframes cs-reading-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cs-reading-panel-header {
  font-family: 'Cinzel', ui-serif, Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(101, 167, 180, 0.7);
  padding: 6px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(101, 167, 180, 0.12);
}

.cs-reading-item {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  text-decoration: none;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}
.cs-reading-item:hover {
  background: rgba(242, 210, 122, 0.07);
  border-color: rgba(242, 210, 122, 0.18);
}
.cs-reading-item + .cs-reading-item {
  margin-top: 2px;
}

.cs-reading-title {
  display: block;
  font-family: 'Cinzel', ui-serif, Georgia, serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #f2d27a;
  margin-bottom: 3px;
  line-height: 1.3;
}

.cs-reading-sub {
  display: block;
  font-family: 'Cormorant Garamond', ui-serif, Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: #a4b3bb;
  line-height: 1.35;
}

/* ============ MOBILE ============ */

@media (max-width: 720px) {
  .cs-tab-sub {
    display: none;
  }
  .cosmology-strip .cs-inner {
    padding: 9px 14px;
    gap: 10px;
  }
  .cs-label {
    flex-basis: 100%;
    padding-right: 0;
    border-right: 0;
    margin-right: 0;
    text-align: center;
    padding-bottom: 4px;
  }
  .cs-tabs {
    justify-content: center;
    flex-grow: 1;
  }
  .cs-reading {
    flex-basis: 100%;
    display: flex;
    justify-content: center;
  }
  .cs-reading-panel {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    min-width: 0;
    width: 92vw;
  }
  @keyframes cs-reading-in {
    from { opacity: 0; transform: translate(-50%, -6px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
  }
}

@media (max-width: 420px) {
  .cs-tab {
    padding: 6px 11px;
  }
  .cs-tab-text {
    font-size: 10px;
    letter-spacing: 0.14em;
  }
}
