/*
 * NOWON Radio - legal pages: promise cards, data table and clause reader.
 * Loaded by Privacy and Terms before their own stylesheet.
 *
 * TABLE OF CONTENTS
 *  1. Legal blocks
 *  2. Media queries
 */

/* ==========================================================================
   1. Legal blocks
   ========================================================================== */
.btn--dark {
  background: var(--ink-dark);
  color: var(--cream);
  font-weight: 900;
}

.section-head--inner .chip--filter {
  height: 44px;
  padding: 0 20px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.promise-card {
  display: flex;
  flex-direction: column;
  min-height: 278px;
  padding: 28px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: var(--surface-1);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}

.promise-card:hover {
  border-color: var(--acc);
}

.promise-card:first-child {
  border-color: var(--acc);
  background: var(--acc);
  color: var(--ink-dark);
}

.promise-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
}

.promise-card__title {
  margin-top: auto;
  padding-top: 24px;
  font-weight: 900;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.05;
  letter-spacing: -.025em;
}

.promise-card__text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  opacity: .8;
}

.data-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table thead th {
  padding: 0 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-60);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .2em;
  text-align: left;
}

.data-table th:first-child {
  padding-left: 20px;
}

.data-table tbody tr {
  border-bottom: 1px solid rgba(245, 237, 216, .1);
  animation: pop .35s both;
}

.data-table tbody th,
.data-table tbody td {
  padding: 20px 10px;
  text-align: left;
  vertical-align: middle;
}

.data-table tbody th:first-child {
  padding-left: 20px;
}

.clause-reader {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 2.6vw, 40px);
  align-items: stretch;
}

.clause-tabs {
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
}

.clause-tab {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid rgba(245, 237, 216, .1);
  border-radius: 14px;
  background: var(--surface-1);
  text-align: left;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.clause-tab:hover {
  border-color: var(--acc);
}

.clause-tab[aria-pressed="true"] {
  border-color: var(--acc);
  background: var(--acc);
  color: var(--ink-dark);
}

.clause-tab__num {
  font-family: var(--mono);
  font-size: 14px;
}

.clause-tab__title {
  font-weight: 800;
  font-size: clamp(14px, 1vw, 17px);
}

.clause-tab__time {
  font-family: var(--mono);
  font-size: 11px;
  opacity: .75;
}

.clause-panel {
  display: flex;
  flex: 3 1 520px;
  flex-direction: column;
  min-width: 0;
  padding: clamp(28px, 3.2vw, 60px);
  border-radius: var(--radius-panel);
  background: var(--cream);
  color: var(--ink-dark);
}

.clause-panel__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .2em;
}

.clause-panel__track {
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: rgba(18, 17, 16, .12);
}

.clause-panel__fill {
  display: block;
  width: var(--fill, 0%);
  height: 100%;
  border-radius: 2px;
  background: var(--ink-dark);
  transition: width .3s ease;
}

.clause {
  animation: pop .4s both;
}

.clause[hidden] {
  display: none;
}

.clause__title {
  margin-top: 50px;
  font-weight: 900;
  font-size: clamp(34px, 3.8vw, 72px);
  line-height: 1;
  letter-spacing: -.045em;
}

.clause__text {
  max-width: 900px;
  margin-top: 30px;
  font-weight: 500;
  font-size: clamp(17px, 1.2vw, 22px);
  line-height: 1.7;
}

.clause-panel__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 30px;
}

.clause-panel__prev {
  border-width: 2px;
}

/* ==========================================================================
   2. Media queries (widest first)
   ========================================================================== */
@media (max-width: 767.98px) {
  .section-head--inner .chip--filter {
    height: 40px;
    padding: 0 14px;
    font-size: 12px;
  }
  .data-table thead th {
    font-size: 12px;
    letter-spacing: .08em;
  }
  .clause-tabs {
    flex-basis: 100%;
    max-width: none;
  }
  .clause-tab {
    grid-template-columns: 44px 1fr auto;
    padding: 12px 14px;
  }
  .clause-tab__time {
    font-size: 12px;
  }
  .clause-panel {
    flex-basis: 100%;
    border-radius: 22px;
  }
  .clause-panel__meta {
    font-size: 12px;
    letter-spacing: .08em;
  }
  .clause__title {
    margin-top: 30px;
  }
  .clause-panel__nav .btn {
    width: 100%;
    height: auto;
    min-height: 54px;
    padding: 10px 18px;
    text-align: center;
    white-space: normal;
  }
}
