/* SHIKA365 dark mode. Only applies when <html data-theme="dark">. */

/* ---------- Toggle button (both modes) ---------- */
#theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1030;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid #d9a44d;
    background: #071b2d;
    color: #d9a44d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: background .2s, color .2s;
}
#theme-toggle svg { width: 22px; height: 22px; }
#theme-toggle:hover { background: #d9a44d; color: #071b2d; }
#theme-toggle:focus-visible { outline: 3px solid #d9a44d; outline-offset: 3px; }
@media print { #theme-toggle { display: none; } }

/* ---------- Palette ---------- */
html[data-theme="dark"] {
    --d-bg: #0f1724;
    --d-surface: #16202f;
    --d-surface-2: #1c2940;
    --d-border: #2a3850;
    --d-text: #e6e9f0;
    --d-muted: #a3adbd;
    color-scheme: dark;
}

html[data-theme="dark"] #theme-toggle { background: #d9a44d; color: #071b2d; }
html[data-theme="dark"] #theme-toggle:hover { background: #fff; color: #071b2d; }

/* ---------- Base ---------- */
html[data-theme="dark"] body { background: var(--d-bg); color: var(--d-text); }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 { color: #fff !important; }
html[data-theme="dark"] h1 a,
html[data-theme="dark"] h2 a,
html[data-theme="dark"] h3 a,
html[data-theme="dark"] h4 a,
html[data-theme="dark"] h5 a,
html[data-theme="dark"] h6 a { color: #fff !important; }
html[data-theme="dark"] h1 a:hover,
html[data-theme="dark"] h2 a:hover,
html[data-theme="dark"] h3 a:hover,
html[data-theme="dark"] h4 a:hover,
html[data-theme="dark"] h5 a:hover,
html[data-theme="dark"] h6 a:hover { color: #d9a44d !important; }
html[data-theme="dark"] p,
html[data-theme="dark"] li { color: var(--d-muted); }
html[data-theme="dark"] .text-muted { color: var(--d-muted) !important; }
html[data-theme="dark"] hr { border-color: var(--d-border); }
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white { background-color: var(--d-surface) !important; }

/* ---------- Guest site: header and menu ---------- */
html[data-theme="dark"] #ftco-navbar {
    background-color: #101a2b !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] #ftco-navbar .navbar-brand { color: #fff !important; }
html[data-theme="dark"] #ftco-navbar .nav-link { color: var(--d-text) !important; }
html[data-theme="dark"] #ftco-navbar .nav-link:hover,
html[data-theme="dark"] #ftco-navbar .nav-item.active .nav-link { color: #d9a44d !important; }
html[data-theme="dark"] #ftco-navbar .btn-nav-login,
html[data-theme="dark"] #ftco-navbar .btn-nav-register { border-color: #4b5d7a; }
html[data-theme="dark"] #ftco-navbar .nav-link.btn-nav-login:hover,
html[data-theme="dark"] #ftco-navbar .nav-link.btn-nav-register:hover {
    background: #d9a44d;
    border-color: #d9a44d;
    color: #071b2d !important;
}
html[data-theme="dark"] #ftco-nav { background: #101a2b !important; }
html[data-theme="dark"] #ftco-nav .nav-link { border-bottom-color: var(--d-border); }
html[data-theme="dark"] .navbar-close-btn { color: var(--d-text); }

/* ---------- Guest site: home page ---------- */
html[data-theme="dark"] .about-section,
html[data-theme="dark"] .amenities-section { background: var(--d-bg); }
html[data-theme="dark"] .rooms-section,
html[data-theme="dark"] .testimonials-section { background: #121c2c; border-top-color: var(--d-border); }
html[data-theme="dark"] .section-desc { color: var(--d-muted); }
html[data-theme="dark"] .about-feature .af-body p { color: var(--d-muted); }
html[data-theme="dark"] .about-img-wrap .main-img { background: var(--d-surface) !important; }
html[data-theme="dark"] .btn-about { background: #d9a44d; color: #071b2d; }
html[data-theme="dark"] .btn-about:hover { background: #bf8e3d; color: #071b2d; }

html[data-theme="dark"] .booking-bar { background: var(--d-surface); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .booking-bar .bb-field { border-right-color: var(--d-border); }
html[data-theme="dark"] .booking-bar .bb-field input,
html[data-theme="dark"] .booking-bar .bb-field select { color: var(--d-text); }
html[data-theme="dark"] .booking-bar .bb-field select option { background: var(--d-surface); color: var(--d-text); }
@media (max-width: 991px) {
    html[data-theme="dark"] .booking-bar .bb-field { border-bottom-color: var(--d-border); }
}

html[data-theme="dark"] .room-card,
html[data-theme="dark"] .amenity-card,
html[data-theme="dark"] .testimonial-card { background: var(--d-surface); border-color: var(--d-border); box-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .room-meta-item { color: var(--d-muted); }
html[data-theme="dark"] .room-divider { border-top-color: var(--d-border); }
html[data-theme="dark"] .btn-room-detail { color: var(--d-text); }
html[data-theme="dark"] .btn-room-detail:hover { color: #d9a44d; }
html[data-theme="dark"] .amenity-card .am-icon { color: #d9a44d; }
html[data-theme="dark"] .testimonial-text { color: var(--d-muted); }
html[data-theme="dark"] .author-name { color: #fff; }

html[data-theme="dark"] .feedback-card { background: var(--d-surface); border-color: #d9a44d; }
html[data-theme="dark"] .feedback-card label { color: var(--d-text) !important; }
html[data-theme="dark"] .feedback-card .btn-primary { background-color: #d9a44d !important; border-color: #d9a44d !important; color: #071b2d !important; }
html[data-theme="dark"] .review-stay-display { color: var(--d-text); border-color: var(--d-border); }
html[data-theme="dark"] .review-stay-display small { color: var(--d-muted); }
html[data-theme="dark"] .rating-picker legend { color: var(--d-text); }
html[data-theme="dark"] .rating-stars label { color: #3a4960; }
html[data-theme="dark"] .rating-stars label.is-highlighted { color: #d9a44d; }

/* ---------- Guest site: contact page ---------- */
html[data-theme="dark"] .contact-section,
html[data-theme="dark"] .map-section { background: var(--d-bg); }
html[data-theme="dark"] .map-section iframe { filter: grayscale(40%) invert(90%) hue-rotate(180deg) contrast(.9); }
html[data-theme="dark"] .contact-form-card { background: var(--d-surface); box-shadow: 0 8px 40px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .contact-form-card .form-label { color: var(--d-muted); }
html[data-theme="dark"] .contact-form-card .form-control { background: transparent; color: var(--d-text); border-bottom-color: var(--d-border); }
html[data-theme="dark"] .contact-form-card .form-control::placeholder { color: #6f7a8d; }
html[data-theme="dark"] .stats-strip { background: var(--d-surface); border-color: var(--d-border); }
html[data-theme="dark"] .stat-item .stat-number { color: #fff; }

/* ---------- Guest site: chat page ---------- */
html[data-theme="dark"] .chat-page { background: var(--d-bg); }
html[data-theme="dark"] .chat-shell { background: var(--d-surface); box-shadow: 0 8px 40px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .chat-box { background: var(--d-bg); }
html[data-theme="dark"] .chat-empty { color: var(--d-muted); }
html[data-theme="dark"] .chat-msg.mine .chat-bubble { background: #24466b; color: #fff; }
html[data-theme="dark"] .chat-msg.theirs .chat-bubble { background: var(--d-surface-2); color: var(--d-text); border-color: var(--d-border); }
html[data-theme="dark"] .chat-form,
html[data-theme="dark"] .chat-error { background: var(--d-surface); border-top-color: var(--d-border); }
html[data-theme="dark"] .chat-form textarea { background: var(--d-bg); color: var(--d-text); border-color: var(--d-border); }

/* ---------- Forms, cards, tables, modals (guest site and admin) ---------- */
html[data-theme="dark"] .card { background: var(--d-surface); border-color: var(--d-border); color: var(--d-text); }
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer { background: var(--d-surface-2); border-color: var(--d-border); }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="search"] {
    background-color: var(--d-bg);
    color: var(--d-text);
    border-color: var(--d-border);
}
html[data-theme="dark"] .form-control:focus { background-color: var(--d-bg); color: var(--d-text); border-color: #d9a44d; }
html[data-theme="dark"] ::placeholder { color: #7d8799; }
html[data-theme="dark"] .booking-bar .bb-field input,
html[data-theme="dark"] .booking-bar .bb-field select { background: transparent; }

html[data-theme="dark"] .table { color: var(--d-text); }
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table thead th { border-color: var(--d-border); }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(255, 255, 255, .06); color: var(--d-text); }

html[data-theme="dark"] .modal-content { background: var(--d-surface); color: var(--d-text); }
html[data-theme="dark"] .modal-footer { border-top-color: var(--d-border); }
html[data-theme="dark"] .dropdown-menu { background: var(--d-surface); border-color: var(--d-border); }
html[data-theme="dark"] .dropdown-item { color: var(--d-text); }
html[data-theme="dark"] .dropdown-item:hover { background: var(--d-surface-2); color: #fff; }
html[data-theme="dark"] .list-group-item { background: var(--d-surface); border-color: var(--d-border); color: var(--d-text); }
html[data-theme="dark"] .close { color: var(--d-text); text-shadow: none; }

html[data-theme="dark"] .alert-success { background: #12372a; border-color: #1f5a43; color: #b7ebd0; }
html[data-theme="dark"] .alert-danger { background: #3a1a20; border-color: #6b2a35; color: #f5c2c9; }
html[data-theme="dark"] .alert-warning { background: #3b2f12; border-color: #6b5420; color: #f3dca3; }
html[data-theme="dark"] .alert-info { background: #11304a; border-color: #1f5a7e; color: #b9dcf3; }
html[data-theme="dark"] .alert strong { color: inherit; }

/* Date picker pop-up on the room page */
html[data-theme="dark"] .datepicker.dropdown-menu { background: var(--d-surface); color: var(--d-text); }
html[data-theme="dark"] .datepicker table tr td.day:hover { background: var(--d-surface-2); }

/* Room list cards on rooms.php (template classes) */
html[data-theme="dark"] .room .text { background: var(--d-surface); }

/* ---------- Admin panel ---------- */
html[data-theme="dark"] .msg-list-item { background: var(--d-surface); border-bottom-color: var(--d-border); }
html[data-theme="dark"] .msg-list-item:hover { background: var(--d-surface-2); }
html[data-theme="dark"] .msg-list-item.active { background: #2a2418; }
html[data-theme="dark"] .msg-list-name { color: #fff; }
html[data-theme="dark"] .msg-list-preview { color: var(--d-muted); }
html[data-theme="dark"] .msg-head { color: #fff; border-bottom-color: var(--d-border); }
html[data-theme="dark"] .msg-box { background: var(--d-bg); }
html[data-theme="dark"] .msg-form { border-top-color: var(--d-border); }
html[data-theme="dark"] .msg-form textarea { background: var(--d-bg); color: var(--d-text); border-color: var(--d-border); }

/* Calendar */
html[data-theme="dark"] .fc { color: var(--d-text); }
html[data-theme="dark"] .fc-theme-standard td,
html[data-theme="dark"] .fc-theme-standard th,
html[data-theme="dark"] .fc-theme-standard .fc-scrollgrid,
html[data-theme="dark"] .fc-theme-standard .fc-list { border-color: var(--d-border); }
html[data-theme="dark"] .fc .fc-daygrid-day-number,
html[data-theme="dark"] .fc .fc-col-header-cell-cushion,
html[data-theme="dark"] .fc .fc-list-day-text,
html[data-theme="dark"] .fc .fc-list-day-side-text { color: var(--d-text); }
html[data-theme="dark"] .fc .fc-day-today { background: rgba(217, 164, 77, .14) !important; }
html[data-theme="dark"] .fc .fc-day-other .fc-daygrid-day-top { opacity: .45; }
html[data-theme="dark"] .fc .fc-list-day-cushion { background: var(--d-surface-2); }
html[data-theme="dark"] .fc-theme-standard .fc-list-day-cushion { background: var(--d-surface-2); }
html[data-theme="dark"] .fc .fc-list-event:hover td { background: var(--d-surface-2); }
/* Admin panel: content area behind the pages */
html[data-theme="dark"] #wrapper > :not(nav),
html[data-theme="dark"] #page-wrapper {
    background-color: var(--d-bg) !important;
}
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .breadcrumb {
    background: transparent;
}
/* Rooms page cards */
html[data-theme="dark"] .room-wrap .half,
html[data-theme="dark"] .room-wrap .half .text { background: var(--d-surface); }
html[data-theme="dark"] .room-wrap .half.left-arrow::after { border-right-color: var(--d-surface); }
html[data-theme="dark"] .list-accomodation li span { color: var(--d-text); }
html[data-theme="dark"] .btn-custom { color: var(--d-text); border-color: var(--d-border); }
#theme-toggle { display: none !important; }