/* /discount-codes/ overview (inc/discount-overview.php).
   The blocks sit inside the theme's flex-wrap card grid, so they take the
   full row. Colours follow the TastyDaily palette used in hub.css. */

.tmf-dc {
  --tmf-green: #5EAD39;
  --tmf-dark: #243F2F;
  --tmf-grey: #5b6b60;
  --tmf-line: #e4e7e4;
  --tmf-surface: #f6f8f5;

  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tmf-dc--top { margin: 0 0 26px; }
.tmf-dc--bottom {
  margin: 30px 0 0;
  padding: 26px 28px;
  background: #fff;
  border: 1px solid var(--tmf-line);
  border-radius: 20px;
}
@media (max-width: 880px) {
  .tmf-dc--bottom { padding: 20px; }
}

.tmf-dc__intro {
  margin: 0 0 24px;
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--tmf-dark);
}
.tmf-dc__updated { display: block; margin-top: 8px; font-size: 14px; color: var(--tmf-grey); }

.tmf-dc__heading {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.3;
  color: var(--tmf-dark);
}
.tmf-dc--top .tmf-dc__heading:last-child { margin: 28px 0 6px; }

.tmf-dc__note { margin: 10px 0 0; font-size: 14px; color: var(--tmf-grey); }
.tmf-dc__note a { color: var(--tmf-dark); font-weight: 700; text-decoration: underline; }

/* Table */
.tmf-dc__table-wrap { margin: 0; }
.tmf-dc__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--tmf-dark);
}
.tmf-dc__table thead th {
  padding: 10px 12px;
  background: var(--tmf-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: left;
}
.tmf-dc__table thead th:first-child { border-radius: 12px 0 0 0; }
.tmf-dc__table thead th:last-child  { border-radius: 0 12px 0 0; }
.tmf-dc__table td,
.tmf-dc__table tbody th {
  padding: 12px;
  border-bottom: 1px solid var(--tmf-line);
  vertical-align: top;
  text-align: left;
  background: #fff;
}
.tmf-dc__section-head th {
  padding: 9px 12px;
  background: var(--tmf-surface);
  border-bottom: 1px solid var(--tmf-line);
}
.tmf-dc__section-title { font-weight: 700; }
.tmf-dc__section-note { margin-left: 8px; font-size: 13px; color: var(--tmf-grey); }

.tmf-dc__name { display: block; font-weight: 700; color: var(--tmf-dark); text-decoration: none; }
.tmf-dc__name:hover { text-decoration: underline; }
.tmf-dc__type { display: block; font-size: 13px; font-weight: 400; color: var(--tmf-grey); }
.tmf-dc__sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--tmf-grey); }

.tmf-dc__code {
  display: inline-block;
  padding: 2px 8px;
  border: 1px dashed var(--tmf-green);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.tmf-dc__links { white-space: nowrap; }
.tmf-dc__detail,
.tmf-dc__go {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}
.tmf-dc__detail { border: 1px solid var(--tmf-line); color: var(--tmf-dark); background: #fff; }
.tmf-dc__detail:hover { border-color: var(--tmf-dark); }
.tmf-dc__go { background: var(--tmf-green); color: #fff; }
.tmf-dc__go:hover { background: #4c9630; color: #fff; }

/* Phone: one card per service */
@media (max-width: 760px) {
  .tmf-dc__table, .tmf-dc__table tbody, .tmf-dc__table tr,
  .tmf-dc__table td, .tmf-dc__table tbody th { display: block; width: 100%; box-sizing: border-box; }
  .tmf-dc__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tmf-dc__table tr { margin: 0 0 12px; border: 1px solid var(--tmf-line); border-radius: 12px; overflow: hidden; }
  .tmf-dc__table tr.tmf-dc__section-head { border: 0; margin: 14px 0 8px; }
  .tmf-dc__section-head th { border-radius: 12px; border-bottom: 0; }
  .tmf-dc__section-note { display: block; margin: 2px 0 0; }
  .tmf-dc__table td, .tmf-dc__table tbody th { padding: 10px 14px; border-bottom: 1px solid var(--tmf-line); }
  .tmf-dc__table tr > :last-child { border-bottom: 0; }
  .tmf-dc__table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tmf-grey);
  }
  .tmf-dc__table td.tmf-dc__links::before { display: none; }
  .tmf-dc__links { white-space: normal; }
}

/* FAQ */
.tmf-dc__q { margin: 18px 0 6px; font-size: 18px; line-height: 1.35; color: var(--tmf-dark); }
.tmf-dc__a { margin: 0 0 6px; font-size: 16px; line-height: 1.6; color: var(--tmf-dark); }
.tmf-dc__a a { color: var(--tmf-green); font-weight: 700; }
