/*
  File CSS của dat-san.html
  Chỉnh giao diện (màu sắc, font, kích thước) tại đây —
  các biến màu chung nằm trong :root ở đầu file.
*/

:root {
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --white: #ffffff;
    --white-90: rgba(255,255,255,0.9);
    --white-70: rgba(255,255,255,0.7);
    --white-40: rgba(255,255,255,0.4);
    --white-20: rgba(255,255,255,0.2);
    --accent: #2fa060;
    --accent-dark: #268551;
    --amber: #d9a13c;
    --blue: #4d8fd1;
    --red: #e2604f;
    --bg1: #14181c;
    --bg2: #0d1013;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: var(--font-body);
    background-image:
        linear-gradient(160deg, rgba(20,24,28,0.88) 0%, rgba(13,16,19,0.92) 100%),
        url('/static/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh; color: var(--white-90);
}
a { color: inherit; text-decoration: none; }

/* ===== THANH ĐIỀU HƯỚNG (đồng bộ thiết kế trang chính của trung tâm) ===== */
#site-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(10, 13, 16, 0.92);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 30px;
    display: flex; align-items: center; justify-content: space-between;
    height: 70px;
}
.nav-logo { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.nav-logo-img { height: 50px; width: auto; display: block; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; font-family: var(--font-heading); }
.logo-line-1 { font-size: 11px; font-weight: 500; letter-spacing: 1.5px; color: var(--white-70); white-space: nowrap; }
.logo-line-2 { font-size: 18px; font-weight: 600; letter-spacing: 3px; color: var(--white); white-space: nowrap; }

.nav-links { list-style: none; display: flex; gap: 35px; }
.nav-links a {
    font-family: var(--font-heading); font-size: 13px; font-weight: 400;
    letter-spacing: 2.5px; color: var(--white-70); transition: color .3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: all .3s ease; }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(0,0,0,0.95); flex-direction: column;
        align-items: center; justify-content: flex-start; gap: 30px;
        padding: 100px 30px 60px; overflow-y: auto;
        opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
    }
    .nav-links.open { opacity: 1; visibility: visible; }
    .nav-links a { font-size: 16px; letter-spacing: 4px; }
    .nav-toggle { position: relative; z-index: 1001; }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .logo-line-1 { font-size: 10px; letter-spacing: 1px; }
    .logo-line-2 { font-size: 16px; letter-spacing: 2px; }
    .nav-logo-img { height: 42px; }
    .nav-container { padding: 0 20px; height: 62px; }
}

.booking-page { max-width: 1100px; margin: 0 auto; padding: 100px 24px 20px; }

/* Tiêu đề */
.booking-hero { text-align: center; margin-bottom: 8px; }
.booking-hero .brand {
    font-size: 12px; letter-spacing: 3px; color: var(--white-40);
    text-transform: uppercase; margin-bottom: 12px;
}
.booking-hero h1 {
    font-family: var(--font-heading); font-weight: 400;
    font-size: clamp(30px, 5vw, 50px); letter-spacing: 6px; color: var(--white);
}
.booking-hero p { color: var(--white-70); letter-spacing: 1px; margin-top: 8px; }
.booking-meta { display:flex; justify-content:center; flex-wrap:wrap; gap:14px; margin-top:18px; }
.booking-meta span {
    font-size: 13px; letter-spacing: 1px; color: var(--white-70);
    border: 1px solid var(--white-20); border-radius: 30px; padding: 7px 16px;
}

/* ===== THANH STICKY: chọn sân + ngày, luôn nằm trên cùng ===== */
.sticky-bar {
    position: sticky; top: 70px; z-index: 500;
    background: rgba(13,16,19,0.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--white-20);
    margin: 22px -24px 0; padding: 12px 24px 10px;
}
.sticky-inner { max-width: 1052px; margin: 0 auto; }
/* 4 sân luôn nằm trên 1 hàng, chia đều — không bị rớt hàng trên mobile */
.chip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip-row.dates { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; margin-top: 8px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.pick {
    font-family: var(--font-heading); font-size: 14px; letter-spacing: 1px;
    color: var(--white-70); background: rgba(255,255,255,0.05);
    border: 1px solid var(--white-20); border-radius: 8px;
    padding: 9px 6px; cursor: pointer; transition: all .2s ease;
    white-space: nowrap; text-align: center; min-width: 0;
    overflow: hidden; text-overflow: ellipsis;
}
/* Áp dụng cho các ô ngày thường (Th 6, Th 7, CN...) — không áp dụng cho ô "Hôm nay" và "Ngày khác" */
.chip-row.dates .pick:not(:first-child):not(.cal-btn) { flex: 1 1 auto; padding: 9px 14px; }
.pick small { display:block; font-family: var(--font-body); font-size: 11px; color: var(--white-40); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick:hover { border-color: var(--white-40); color: var(--white); }
.pick.active { background: var(--white); color: #14181c; border-color: var(--white); }
.pick.active small { color: rgba(0,0,0,0.55); }

/* Nút mở lịch tháng: "Ngày khác" — cho xuống 2 dòng (icon trên, chữ dưới) và to hơn ô Thứ */
.pick.cal-btn {
    flex: 0 0 auto; display:flex; flex-direction: column; align-items:center; justify-content:center;
    gap: 3px; min-width: 78px; padding: 9px 12px; white-space: normal; line-height: 1.2;
}
.pick.cal-btn svg { width:17px; height:17px; }
.pick.cal-btn svg rect, .pick.cal-btn svg line { stroke: currentColor; }

/* Ô "Hôm nay" (chip ngày đầu tiên) — to hơn, chữ "Hôm nay" hiện đủ không bị cắt */
.chip-row.dates .pick:first-child {
    flex: 0 0 auto; min-width: 78px; padding: 9px 14px;
    white-space: normal; line-height: 1.2;
}

/* ===== POPUP LỊCH THÁNG ===== */
.cal-overlay {
    position: fixed; inset: 0; z-index: 1600;
    background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.cal-overlay.open { display: flex; }
.cal-box {
    background: #171c21; border: 1px solid var(--white-20); border-radius: 14px;
    padding: 20px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.cal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 14px; }
.cal-head .cal-title { font-family: var(--font-heading); font-size: 16px; letter-spacing: 2px; color: var(--white); }
.cal-nav {
    background: rgba(255,255,255,.06); border: 1px solid var(--white-20); color: var(--white-70);
    border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px;
}
.cal-nav:hover:not(:disabled) { color: var(--white); border-color: var(--white-40); }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.cal-grid { display:grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-wd { text-align:center; font-size: 11px; color: var(--white-40); padding: 4px 0; letter-spacing: 1px; }
.cal-day {
    aspect-ratio: 1; display:flex; align-items:center; justify-content:center;
    font-size: 14px; color: var(--white-90); border-radius: 8px; cursor: pointer;
    border: 1px solid transparent;
}
.cal-day:hover { background: rgba(255,255,255,.08); }
.cal-day.off { color: var(--white-20); cursor: not-allowed; }
.cal-day.off:hover { background: none; }
.cal-day.today { border-color: var(--accent); }
.cal-day.sel { background: var(--accent); color: #fff; }
.cal-close { width:100%; margin-top: 14px; background: rgba(255,255,255,.08); border:none; color: var(--white-70);
    font-family: var(--font-heading); letter-spacing:2px; padding: 11px; border-radius: 8px; cursor:pointer; }

/* Panel */
.panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px; padding: 26px; margin-top: 26px;
}
.panel h2 {
    font-family: var(--font-heading); font-weight: 500; font-size: 15px;
    letter-spacing: 3px; text-transform: uppercase; color: var(--white); margin-bottom: 6px;
}
.panel .hint { font-size: 13px; color: var(--white-40); margin-bottom: 18px; }

/* Lưới khung giờ 30 phút */
.slots { display:grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 4px; }
.slot {
    border-radius: 8px; padding: 11px 10px; text-align: center; cursor: pointer;
    border: 1px solid var(--white-20); background: rgba(255,255,255,0.05);
    transition: all .15s ease; min-height: 64px;
}
.slot .time { font-family: var(--font-heading); font-size: 15px; letter-spacing: 1px; color: var(--white); }
.slot .price { font-size: 12px; color: var(--white-40); margin-top: 4px; }
.slot:hover { border-color: var(--white-40); }
.slot.selected { background: var(--accent); border-color: var(--accent); }
.slot.selected .time, .slot.selected .price { color: #fff; }

.slot.busy { cursor: not-allowed; background: rgba(255,255,255,0.02); border-color: transparent; }
.slot.busy .time { color: var(--white-40); }
.slot.busy .price { font-weight: 600; }
.slot.busy.st-confirmed .price { color: var(--accent); }
.slot.busy.st-pending  .price { color: var(--amber); }
.slot.busy.st-fixed    .price { color: var(--blue); }
.slot.busy.st-locked   .price { color: var(--white-40); }
.slot.past { cursor:not-allowed; opacity:.4; }
.slot.past .time { text-decoration: line-through; color: var(--white-40); }

.legend { display:flex; gap:16px; flex-wrap:wrap; margin-top:16px; font-size:12px; color: var(--white-40); }
.legend i { display:inline-block; width:13px; height:13px; border-radius:3px; margin-right:6px; vertical-align:-2px; }
.legend .l-free { background: rgba(255,255,255,0.08); border:1px solid var(--white-20); }
.legend .l-sel  { background: var(--accent); }
.legend .l-conf { background: rgba(47,160,96,0.35); }
.legend .l-pend { background: rgba(217,161,60,0.4); }
.legend .l-fix  { background: rgba(77,143,209,0.4); }
.legend .l-lock { background: rgba(255,255,255,0.15); }

/* Tóm tắt & form */
.summary-list { list-style:none; margin:0 0 16px; padding:0; }
.summary-list li {
    display:flex; justify-content:space-between; align-items:center;
    padding: 10px 0; border-bottom: 1px solid var(--white-20); color: var(--white-90); font-size: 15px;
}
.summary-list .rm { color: var(--red); cursor:pointer; font-size:13px; letter-spacing:1px; background:none; border:none; }
.summary-total { display:flex; justify-content:space-between; font-family: var(--font-heading); font-size:18px; letter-spacing:1px; color: var(--white); margin: 8px 0 20px; }

.form-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, textarea {
    width:100%; font-family: var(--font-body); font-size:15px;
    color: var(--white); background: rgba(255,255,255,0.06);
    border: 1px solid var(--white-20); border-radius: 8px; padding: 13px 16px; outline:none;
    transition: border-color .2s ease;
}
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--white-40); }
.full { grid-column: 1 / -1; }

.btn-confirm {
    font-family: var(--font-heading); font-size:14px; letter-spacing:3px; text-transform:uppercase;
    color:#fff; background: var(--accent); border:none; border-radius:8px;
    padding: 15px 34px; cursor:pointer; margin-top:18px; transition: background .2s ease;
}
.btn-confirm:hover { background: var(--accent-dark); }
.btn-confirm:disabled { background: rgba(255,255,255,0.12); color: var(--white-40); cursor:not-allowed; }

.empty { color: var(--white-40); font-size: 14px; padding: 8px 0; }

.toast {
    position: fixed; left:50%; bottom:30px; transform: translateX(-50%) translateY(20px);
    background: var(--accent); color:#fff; padding:14px 26px; border-radius:8px;
    font-family: var(--font-heading); letter-spacing:1px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
    opacity:0; pointer-events:none; transition: all .3s ease; z-index:2000; max-width: 90vw; text-align:center;
}
.toast.show { opacity:1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

.page-note { text-align:center; font-size:12px; color: var(--white-40); margin-top: 30px; letter-spacing:.5px; }

/* ===== FOOTER THÔNG TIN ===== */
.site-footer {
    border-top: 1px solid var(--white-20);
    margin-top: 0px; padding: 30px 24px 30px;
    text-align: center;
}
.site-footer .f-name {
    font-family: var(--font-heading); font-size: 15px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--white);
}
.site-footer .f-line { color: var(--white-70); font-size: 14px; margin-top: 8px; letter-spacing: .5px; }
.site-footer .f-line a { color: var(--accent); }
.site-footer .f-copy { color: var(--white-40); font-size: 12px; margin-top: 14px; }

/* ===== CỤM ICON NỔI GÓC PHẢI DƯỚI (dính khi cuộn) ===== */
.float-contact {
    position: fixed; right: 16px; bottom: 18px; z-index: 1500;
    display: flex; flex-direction: column; gap: 10px;
}
.float-contact a {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.45);
    transition: transform .15s ease;
}
.float-contact a:hover { transform: scale(1.1); }
.float-contact svg { width: 24px; height: 24px; }
.fc-fb   { background: #1877f2; }
.fc-zalo { background: #0068ff; }
.fc-map  { background: #ffffff; }

@media (max-width: 600px) {
    .float-contact { right: 12px; bottom: 14px; }
    .float-contact a { width: 42px; height: 42px; }
}

@media (max-width: 600px) {
    body { background-attachment: scroll; } /* fixed ảnh nền dễ giật trên mobile, chuyển sang scroll */
    .form-grid { grid-template-columns: 1fr; }
    .booking-page { padding: 20px 14px 30px; }
    .sticky-bar { margin: 18px -14px 0; padding: 10px 14px 8px; top: 62px; }
    .booking-page { padding-top: 84px; }
    .slots { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
    .pick { padding: 8px 4px; font-size: 12px; letter-spacing: .3px; }
    .pick small { font-size: 9.5px; }
    /* Ô "Sân X": cho phép chữ nhỏ xuống dòng thay vì tràn ra ngoài khung */
    .chip-row:not(.dates) .pick { white-space: normal; line-height: 1.25; padding: 7px 3px; }
    .chip-row:not(.dates) .pick small { white-space: normal; overflow: visible; }
    /* Ô ngày thường (Th 6, Th 7...): vẫn cuộn ngang, chữ không tràn nhờ ellipsis đã set ở .pick */
    .chip-row.dates .pick:not(:first-child):not(.cal-btn) { padding: 8px 10px; min-width: 52px; }
    /* Ô "Hôm nay" và "Ngày khác" trên mobile: to hơn ô Thứ, chữ hiện đủ / xuống 2 dòng */
    .chip-row.dates .pick:first-child,
    .pick.cal-btn { min-width: 66px; font-size: 11.5px; padding: 8px 10px; }
    .booking-hero .site-logo { max-height: 58px; }
}