/* v321G — Fees page responsive table redesign.
   Goal: on tablet/mobile, show fee information within one readable frame without forcing horizontal dragging. */

/* Keep desktop stable; only tighten visuals slightly. */
.fees-page .urgent-table-wrap,
body:not([class*="admin"]) .urgent-table-wrap {
  border-radius: 24px;
}

body:not([class*="admin"]) .fees-table th,
body:not([class*="admin"]) .fees-table td {
  word-break: normal;
}

body:not([class*="admin"]) .fees-table td strong {
  color: #0f172a;
}

@media (max-width: 980px) {
  body:not([class*="admin"]) .urgent-table-wrap {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  body:not([class*="admin"]) .fees-table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
  }

  body:not([class*="admin"]) .fees-table thead {
    display: none !important;
  }

  body:not([class*="admin"]) .fees-table tbody,
  body:not([class*="admin"]) .fees-table tr,
  body:not([class*="admin"]) .fees-table td {
    display: block !important;
    width: 100% !important;
  }

  body:not([class*="admin"]) .fees-table tr {
    margin: 0 0 14px !important;
    padding: 16px !important;
    border: 1px solid rgba(226, 232, 240, .95) !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05) !important;
  }

  body:not([class*="admin"]) .fees-table td {
    min-width: 0 !important;
    padding: 10px 0 !important;
    border: 0 !important;
    text-align: left !important;
  }

  body:not([class*="admin"]) .fees-table td + td {
    border-top: 1px dashed rgba(203, 213, 225, .92) !important;
  }

  body:not([class*="admin"]) .fees-table td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin: 0 0 4px !important;
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
  }

  body:not([class*="admin"]) .fees-table td[data-label="Base service fee"],
  body:not([class*="admin"]) .fees-table td[data-label="Extra fee"],
  body:not([class*="admin"]) .fees-table td[data-label="Fee"] {
    color: #b91c1c !important;
    font-weight: 900 !important;
    font-size: 17px !important;
  }

  body:not([class*="admin"]) .fees-table td[data-label="Base service fee"]::before,
  body:not([class*="admin"]) .fees-table td[data-label="Extra fee"]::before,
  body:not([class*="admin"]) .fees-table td[data-label="Fee"]::before {
    color: #991b1b !important;
  }

  body:not([class*="admin"]) .fees-table td[data-label="Option"],
  body:not([class*="admin"]) .fees-table td[data-label="Displayed timing"],
  body:not([class*="admin"]) .fees-table td[data-label="Validity / entry type"] {
    color: #1f2937 !important;
    font-weight: 800 !important;
  }

  body:not([class*="admin"]) .fees-table td[data-label="Suggested use"],
  body:not([class*="admin"]) .fees-table td[data-label="Best for"],
  body:not([class*="admin"]) .fees-table td[data-label="Notes"] {
    color: #475569 !important;
    font-size: 14px !important;
    line-height: 1.52 !important;
  }
}

@media (max-width: 480px) {
  body:not([class*="admin"]) .fees-table tr {
    margin-bottom: 12px !important;
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body:not([class*="admin"]) .fees-table td {
    padding: 9px 0 !important;
  }

  body:not([class*="admin"]) .fees-table td::before {
    font-size: 11px !important;
  }

  body:not([class*="admin"]) .fees-table td[data-label="Base service fee"],
  body:not([class*="admin"]) .fees-table td[data-label="Extra fee"],
  body:not([class*="admin"]) .fees-table td[data-label="Fee"] {
    font-size: 16px !important;
  }
}
