/* Magazine details page — hero, tabbed panels, sticky subscribe box */

.mag-error {
  width: min(100% - 32px, 1240px);
  margin: 18px auto 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  background: rgba(220, 76, 76, 0.1);
  color: #b42318;
  font-size: 14px;
}

/* ---------------- Hero ---------------- */

.mag-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 34px;
  align-items: start;
  margin-top: 22px;
  padding: 30px 34px;
  border-radius: 10px;
  background: var(--purple, #2a1d44);
  color: #fff;
}

.mag-hero-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 4px;
}

.mag-kicker {
  margin: 0 0 6px;
  color: #f3b13f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.mag-hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.15;
}

.mag-tagline {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.mag-description {
  margin: 12px 0 0;
  max-width: 110ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.65;
}

.mag-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 20px 0 0;
}

.mag-hero-facts dt {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.mag-hero-facts dd {
  margin: 4px 0 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

/* ---------------- Layout ---------------- */

.mag-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas:
    "tabs ."
    "main aside";
  column-gap: 28px;
  row-gap: 14px;
  align-items: start;
  margin: 12px auto 60px;
}

.mag-main {
  grid-area: main;
  min-width: 0;
}

.mag-aside {
  grid-area: aside;
}

/* ---------------- Tabs ---------------- */

.mag-tabs {
  grid-area: tabs;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mag-tab {
  padding: 9px 16px;
  border: 1px solid #e6e3e8;
  border-radius: 5px;
  background: #f3f3f3;
  color: #4c4552;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.mag-tab:hover {
  border-color: #cfc9d4;
}

.mag-tab.is-active {
  border-color: rgba(214, 61, 61, 0.28);
  background: #fdeceb;
  color: var(--red, #ec6464);
  font-weight: 400;
}

/* ---------------- Panels ---------------- */

.mag-panel {
  padding: 24px 26px 26px;
  border: 1px solid #ece9ee;
  border-radius: 10px;
  background: #fff;
}

.mag-panel > h2 {
  margin: 0;
  font-size: 21px;
}

.mag-panel > h3 {
  margin: 26px 0 10px;
  font-size: 16px;
}

.mag-panel p {
  color: #675f68;
  font-size: 14px;
  line-height: 1.65;
}

.mag-panel-sub {
  margin: 6px 0 18px;
}

.mag-label {
  color: #f0a324 !important;
  font-size: 14px !important;
}

.mag-footnote {
  color: #9b949f !important;
  font-size: 12.5px !important;
}

.mag-empty {
  color: #9b949f;
  font-size: 13px;
}

/* ---------------- Tab 1: current issue ---------------- */

.mag-current {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #efedf1;
  border-radius: 8px;
  background: #fafafa;
}

.mag-current img {
  display: block;
  width: 78px;
  height: 108px;
  object-fit: cover;
  border-radius: 3px;
  background: #ece9ee;
}

.mag-current-body h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.mag-current-body p {
  margin: 0 0 14px;
}

/* Compact CTA here — the full-width one lives in the sidebar */
.mag-current-body .mag-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4cm;
  padding-inline: 0;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* ---------------- Tab 2: editorial board ---------------- */

.mag-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}

.mag-editor-grid--single {
  grid-template-columns: 1fr;
}

.mag-editor-grid--single .mag-editor h4,
.mag-editor-grid--single .mag-editor-meta,
.mag-editor-grid--single .mag-editor-mail {
  letter-spacing: 0.02em;
}

.mag-editor-grid--single .mag-editor-meta {
  line-height: 1.7 !important;
}

.mag-editor {
  padding: 13px 15px;
  border: 1px solid #ece9ee;
  border-radius: 7px;
  background: #fff;
}

.mag-editor h4 {
  margin: 0;
  font-size: 14.5px;
}

.mag-editor-meta {
  margin: 5px 0 0 !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}

.mag-editor-mail {
  display: inline-block;
  margin-top: 6px;
  color: var(--red, #d63d3d);
  font-size: 12px;
  word-break: break-all;
}

.mag-workflow {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: mag-step;
}

.mag-workflow li {
  counter-increment: mag-step;
  margin-bottom: 8px;
  padding: 11px 14px;
  border-radius: 6px;
  background: #f5f3f6;
  color: #4c4552;
  font-size: 13.5px;
  line-height: 1.55;
}

.mag-workflow li::before {
  content: counter(mag-step) ". ";
  font-weight: 600;
}

/* ---------------- Tab 3: submit ---------------- */

.mag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mag-chips li {
  padding: 8px 15px;
  border: 1px solid #ece9ee;
  border-radius: 20px;
  background: #fafafa;
  color: #4c4552;
  font-size: 13px;
}

.mag-chips li::before {
  content: "• ";
  color: #b9b2be;
}

.mag-rules {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 7px;
  background: #fdfbe9;
}

.mag-rules h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.mag-rules p {
  margin: 0;
  font-size: 12.5px !important;
}

.mag-buy-btn.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

/* ---------------- Tab 4: past issues ---------------- */

.mag-past-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 16px;
}

.mag-past-tools[hidden] {
  display: none;
}

.mag-past-tools label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #675f68;
  font-size: 12px;
  font-weight: 600;
}

.mag-past-tools select {
  min-width: 160px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e4e0e6;
  border-radius: 6px;
  background: #fff;
  color: #2d2733;
  font-size: 13px;
}

.mag-past-tools select:disabled {
  color: #9b949f;
  background: #f7f5f8;
}

.mag-past-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #ece9ee;
  border-radius: 8px;
  background: #fff;
}

.mag-past-card img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 3px;
  background: #ece9ee;
}

.mag-past-card h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.mag-past-card p {
  margin: 0 0 10px;
  color: #9b949f;
  font-size: 12.5px;
}

.mag-past-card .btn {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: normal;
  line-height: 1.3;
  text-align: center;
}

.mag-see-all {
  margin: 16px 0 0;
  text-align: center;
}

.mag-see-all[hidden] {
  display: none;
}

.mag-see-all-btn {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #d9d4dd;
  border-radius: 4px;
  background: #fff;
  color: #2d2733;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.mag-see-all-btn:hover {
  border-color: #2d2733;
}

/* ---------------- Tab 4: past issues ---------------- */

.mag-volume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.mag-volume {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #ece9ee;
  border-radius: 8px;
  background: #fafafa;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mag-volume:hover {
  border-color: #2a1d44;
}

.mag-past-gate {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fdf1e3;
  color: #a8620d;
  font-size: 13px;
  line-height: 1.45;
}

.mag-past-gate[hidden] {
  display: none;
}

.mag-volume-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 6px;
  background: var(--purple, #2a1d44);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.mag-volume-badge em {
  font-size: 8px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.66;
}

.mag-volume-body h4 {
  margin: 0;
  font-size: 15px;
}

.mag-volume-body p {
  margin: 3px 0 0 !important;
  font-size: 12.5px !important;
  color: #9b949f !important;
}

/* ---------------- Tab 6: magazine info ---------------- */

.mag-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  margin: 0;
}

.mag-info-grid > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #efedf1;
}

.mag-info-grid dt {
  color: #675f68;
  font-size: 13.5px;
  white-space: nowrap;
}

.mag-info-grid dd {
  margin: 0;
  color: #2d2733;
  font-size: 13.5px;
  text-align: right;
}

.mag-tenure-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid #efedf1;
  font-size: 13.5px;
}

.mag-tenure-row span:last-child {
  color: #9b949f;
}

/* ---------------- Subscribe box ---------------- */

.mag-aside {
  position: sticky;
  top: 90px;
}

.mag-buy {
  overflow: hidden;
  border: 1px solid #ece9ee;
  border-radius: 10px;
  background: #fff;
}

.mag-buy-head {
  padding: 16px 18px;
  background: #b3221f;
  color: #fff;
}

.mag-buy-eyebrow {
  margin: 0;
  color: #f3b13f;
  font-size: 12px;
  font-weight: 600;
}

.mag-buy-price {
  margin: 4px 0 0;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
}

.mag-buy-breakup {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.mag-buy-body {
  padding: 16px 18px 18px;
}

.mag-buy-body h3 {
  margin: 0;
  font-size: 18px;
}

.mag-buy-date {
  margin: 2px 0 14px;
  color: #9b949f;
  font-size: 13px;
}

.mag-buy-facts {
  margin: 0 0 16px;
}

.mag-buy-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid #efedf1;
}

.mag-buy-facts dt {
  color: #9b949f;
  font-size: 12.5px;
}

.mag-buy-facts dd {
  margin: 0;
  color: #2d2733;
  font-size: 12.5px;
  text-align: right;
}

.mag-buy-btn,
.mag-buy-whatsapp {
  display: block;
  width: 100%;
  text-align: center;
}

.mag-buy-body .mag-buy-btn {
  white-space: normal;
  line-height: 1.3;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* .btn-outline is white-on-transparent for dark heroes — repaint it for the white card */
.mag-buy-whatsapp {
  margin-top: 9px;
  border-color: #d9d4dd;
  background: #fff;
  color: #2d2733;
  text-align: center;
  padding-top:9px ;
  text-decoration: none;
}

.mag-buy-whatsapp:hover {
  border-color: #000000;
  color: #0c0c0c;
}

/* Inert until the price has loaded, then magazine-page.js enables it */
.mag-buy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.mag-buy-note {
  margin: 12px 0 0;
  color: #9b949f;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1080px) {
  .mag-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tabs"
      "main"
      "aside";
  }

  .mag-aside {
    position: static;
    margin-top: 14px;
  }
}

@media (max-width: 760px) {
  .mag-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .mag-hero-cover img {
    width: 170px;
  }

  .mag-hero-facts {
    gap: 24px;
  }

  .mag-info-grid {
    grid-template-columns: 1fr;
  }

  .mag-panel {
    padding: 20px 18px;
  }
}
