/* svrates.css — пар на svrates.js (17.09.2026). Mobile-first: секоја понуда е
   картичка до 640px ширина на СЕКЦИЈАТА (container query, не прозорецот — деталите
   се дијалог), табела над тоа. Боите се оние на деталите во svrail.css. */

.sv-hotel-dialog-box[data-svr-wide] { width: min(980px, 100%); }
.sv-hotel-details-content[data-svr-rates] > .sv-hotel-details-book,
.sv-hotel-details-content[data-svr-rates] > .sv-hotel-details-process { display: none !important; }

.svr { container-type: inline-size; container-name: svr; margin: 20px 0 8px; color: #10213d; }
.svr * { box-sizing: border-box; }
.svr-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.svr-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; }
.svr-stay { margin: 0; font-size: 14px; color: #475569; }

.svr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.sv-hotel-dialog-box .svr-tab {
  flex: 1 1 auto; max-width: 260px; min-height: 44px; padding: 8px 12px; border: 1px solid #cbd5e1; background: #fff; color: #10213d;
  border-radius: 999px; font-size: 14px; font-weight: 600;
}
.sv-hotel-dialog-box .svr-tab[aria-pressed="true"] { background: #10213d; border-color: #10213d; color: #fff; }
.svr-tab-n { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: #e2e8f0; color: #10213d; font-size: 12px; line-height: 20px; text-align: center; }
.svr-tab[aria-pressed="true"] .svr-tab-n { background: #ff7900; color: #fff; }

/* Мобилно: табелата е листа од картички. `role` ја чува семантиката. */
.svr-table, .svr-table tbody { display: block; width: 100%; border-collapse: collapse; }
.svr-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.svr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "room room" "terms terms" "status status" "price act";
  gap: 8px 12px; align-items: center;
  padding: 12px; margin: 0 0 10px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
}
.svr-row[data-svr-status="unavailable"] { background: #f8fafc; }
.svr-row td { display: block; padding: 0; border: 0; min-width: 0; }
.svr-room { grid-area: room; }
.svr-price { grid-area: price; text-align: left; }
.svr-terms { grid-area: terms; }
.svr-status { grid-area: status; }
.svr-act { grid-area: act; text-align: right; }
.svr-room-name { display: block; font-weight: 700; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.svr-meal { display: block; font-size: 14px; color: #334155; margin-top: 2px; }
.svr-term { display: block; font-size: 14px; line-height: 1.45; color: #334155; overflow-wrap: anywhere; }
.svr-term + .svr-term { margin-top: 2px; color: #64748b; }
.svr-amount { display: block; font-size: 18px; font-weight: 800; white-space: nowrap; }
.svr-basis { display: block; font-size: 12px; color: #64748b; line-height: 1.3; }
.svr-supplier { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #6d28d9; overflow-wrap: anywhere; }

.svr-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.svr-pill[data-svr-status="available"] { background: #dcfce7; color: #166534; }
.svr-pill[data-svr-status="on_request"] { background: #ffedd5; color: #9a4d00; }
.svr-pill[data-svr-status="unavailable"] { background: #fee4e2; color: #b42318; }

.sv-hotel-dialog-box .svr-btn {
  min-height: 44px; min-width: 112px; padding: 10px 16px; border: 0; background: #ff7900; color: #fff;
  font-weight: 700; font-size: 15px; white-space: nowrap;
}
.sv-hotel-dialog-box .svr-row[data-svr-status="on_request"] .svr-btn { background: #fff; color: #9a4d00; border: 2px solid #ff7900; }
.svr-error { margin: 6px 0 0; font-size: 13px; color: #b42318; text-align: left; }

.sv-hotel-dialog-box .svr-more {
  width: 100%; min-height: 44px; margin: 2px 0 0; padding: 10px 16px; border: 1px dashed #94a3b8;
  background: #f8fafc; color: #10213d; font-weight: 700;
}
.svr-more[hidden], .svr-admin-note[hidden] { display: none !important; }
.svr-admin-note { margin: 12px 0 0; font-size: 13px; color: #64748b; }

/* Само за администратор (серверот праќа имиња само по Java-потврда). */
.svr-admin { margin: 16px 0 0; border: 1px solid #ddd6fe; border-radius: 12px; background: #faf5ff; }
.svr-admin-sum { cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.svr-admin-badge { padding: 2px 8px; border-radius: 999px; background: #6d28d9; color: #fff; font-size: 12px; }
.svr-admin-group { padding: 4px 12px 10px; border-top: 1px solid #ede9fe; }
.svr-admin-name { margin: 8px 0 4px; font-size: 14px; }
.svr-admin-rows { list-style: none; margin: 0; padding: 0; }
.svr-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid #ede9fe; font-size: 13px; }
.svr-admin-room { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.svr-admin-price { font-weight: 800; white-space: nowrap; }
.svr-admin-row .svr-pill { font-size: 12px; padding: 2px 8px; }
.svr-admin-shown { font-size: 12px; font-weight: 700; color: #6d28d9; }

/* Картичка: статус во три зборови и добавувач (админ). */
.sv-rail-request[data-svr-status="available"] { color: #166534 !important; }
.sv-rail-request[data-svr-status="on_request"] { color: #c25700 !important; }
.sv-rail-request[data-svr-status="unavailable"] { color: #b42318 !important; }
.svr-card-supplier { margin-top: 2px; font-size: 13px; font-weight: 700; color: #6d28d9; overflow-wrap: anywhere; }
/* Попапот на мапата пишува „Добавувач: …“ за секого — клиентот не го гледа. */
html:not([data-svr-admin="1"]) .sv-lab-map-popup-supplier { display: none !important; }

@container svr (min-width: 640px) {
  .svr-table { display: table; table-layout: fixed; }
  .svr-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: table-header-group; }
  .svr-table tbody { display: table-row-group; }
  .svr-table th { text-align: left; font-size: 13px; font-weight: 700; color: #475569; padding: 8px 10px; border-bottom: 2px solid #e2e8f0; }
  .svr-table th:nth-child(1) { width: 24%; }
  .svr-table th:nth-child(2) { width: 30%; }
  .svr-table th:nth-child(3) { width: 16%; }
  .svr-table th:nth-child(4) { width: 14%; text-align: right; }
  .svr-table th:nth-child(5) { width: 16%; }
  .svr-table .svr-sr-col { font-size: 0; }
  .svr-row { display: table-row; padding: 0; margin: 0; border: 0; border-radius: 0; }
  .svr-row td { display: table-cell; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid #e2e8f0; }
  .svr-row td.svr-act { vertical-align: middle; }
  .svr-price, .svr-act { text-align: right; }
  .svr-basis { margin-left: auto; }
  .sv-hotel-dialog-box .svr-btn { min-width: 0; width: 100%; padding: 10px 8px; }
  .svr-pill { font-size: 12px; }
}
