/*
 * Styles for the facility booking page (resources/views/facilities/show.blade.php).
 * Hoisted out of the Blade template's inline <style> block; loaded via
 * versioned_asset('css/facilities/show.css') in a @push('styles') block.
 * Behaviour-preserving move — rules are unchanged from the original template.
 */

footer .footer {
    display: none !important;
}
.menu-section {
    padding: 0px !important;
}

.containerCSS {
    margin-bottom: 0 !important;
    padding-bottom: 10px !important;
}

.menu-list {
    max-height: none !important;
    overflow-y: visible !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-list > div:not(.category-section) {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clinic-name {
    text-align: center !important;
    flex: 1;
    padding-left: 40px !important;
    padding-right: 0 !important;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 16px;
}

.info-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.info-btn svg {
    color: #888;
}

.info-btn:hover svg {
    color: #007cbe;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-right: 24px;
}

.modal-details {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.modal-details > div {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.modal-details > div:last-child {
    margin-bottom: 0;
}

.footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.hoursDiv {
    display: flex;
    align-items: start;
    gap: 10px;
}
.hoursGrid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.hoursRow {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.hoursDay{
    font-size: 0.85rem;
    font-weight: 500;
    /* color: #333; */
    min-width: 80px;
    flex-shrink: 0;
}

.hoursTimes {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hoursTxt{
    font-size: 0.85rem;
    /* color: #666; */
}

.marginl{
    margin-left: 8px;
}

.marginb{
    margin-bottom: 6px;
}

.comaSeparator{
    margin-right: 3px;
}

.menu-section .menu-list {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.menu-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease !important;
    padding: 16px !important;
    position: relative;
}

.menu-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    border-color: #007cbe !important;
}

.menu-item.no-image .menu-content {
    flex: 1;
}

.menu-item.no-image .menu-content {
    width: 100%;
}

.menu-item.selected {
    border-color: #007cbe !important;
    background: #f8fbff !important;
}

.menu-select-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    flex-shrink: 0;
}

.select-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
}

.menu-item.selected .select-circle {
    border-color: #007cbe;
    background: #007cbe;
}

.menu-item.selected .select-circle::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.menu-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.menu-info-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 10px;
}

.menu-duration {
    font-size: 0.85rem;
    color: #666;
    flex-shrink: 0;
}

.menu-info-row .text-xs {
    font-size: 0.9rem !important;
    font-weight: 600;
    color: #007cbe;
    flex-shrink: 0;
}

.menu-description {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

.description-text {
    color: #555;
    white-space: pre-line;
}

.description-text.collapsed {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.read-more-btn {
    /* Hidden by default; JS adds .read-more-btn--visible when the description
       overflows its line clamp (replaces the old inline style="display:none"). */
    display: none;
    background: none;
    border: none;
    color: #007cbe;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    font-weight: 500;
}

.read-more-btn--visible {
    display: inline-block;
}

.read-more-btn:hover {
    text-decoration: underline;
}

.set-menu-badge {
    display: inline-block;
    background: #e0f0ff;
    color: #007cbe;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.set-menu-constraint-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.set-menu-composition {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
}

.set-menu-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 16px;
    margin-top: 4px;
}

.set-menu-separator-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.set-menu-separator-label {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    white-space: nowrap;
}

.section-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    padding: 16px 20px 10px !important;
}

/* Category section */
.category-section {
    margin-bottom: 4px;
}

.category-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    background: #f5f5f5;
    border-radius: 8px;
    margin: 0 16px 8px 16px;
    transition: background 0.2s;
}

.category-section-header:hover {
    background: #ebebeb;
}

.category-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.category-section-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 12px;
}

.category-section-toggle-text {
    font-weight: 500;
}

.category-section-toggle {
    font-size: 10px;
    transition: transform 0.2s;
}

.category-section-toggle.collapsed {
    transform: rotate(-90deg);
}

.category-section-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.category-section-content.hidden {
    display: none;
}

.category-section-header .selected-badge {
    font-size: 0.7rem;
    background: #007cbe;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.category-section.has-selected {
    border-left: 3px solid #007cbe;
}

.menu-item.selected .check-mark {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
}

.menu-item.selected .check-mark::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.check-mark {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
    margin-top: 2px;
    margin-left: 4px;
}

.selection-tray {
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 36rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
    padding: 12px 16px;
    box-sizing: border-box;
}

.selected-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.selected-chips::-webkit-scrollbar {
    display: none;
}

.placeholder-text {
    font-size: 0.8rem;
    color: #999;
    padding: 4px 0;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef4fb;
    border: 1px solid #c5d9ed;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: #007cbe;
    white-space: nowrap;
    flex-shrink: 0;
}

.chip-remove {
    background: none;
    border: none;
    color: #007cbe;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    font-weight: 500;
}

.chip-remove:hover {
    color: #005a8c;
}

.confirm-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #007cbe;
    color: white;
}

.confirm-button:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

.confirm-button:not(:disabled):hover {
    background: #006399;
}

.business-hours-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.business-hours-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #666;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.business-hours-toggle:hover {
    color: #007CBE;
}

.toggle-label {
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: #666;
    flex-shrink: 0;
}

.business-hours-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.business-hours-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    width: 100%;
}

.business-hours-content.open {
    max-height: 500px;
    opacity: 1;
    margin-top: 12px;
    margin-left: 27px;
}

.secondaryHeader {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .clinic-name {
        font-size: 1.1rem;
        padding-right: 0 !important;
    }
}

/* Patient Bar Styles */
.patient-bar {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #007cbe;
}

.patient-bar-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #007cbe;
}

.patient-bar-icon svg {
    width: 20px;
    height: 20px;
    color: #007cbe;
}

.patient-bar-info {
    flex: 1;
    min-width: 0;
}

.patient-bar-label {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 1px;
}

.patient-bar-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.patient-bar-badge {
    font-size: 11px;
    font-weight: 500;
    color: #007cbe;
    background: #e0f0ff;
    padding: 1px 8px;
    border-radius: 4px;
}

.patient-bar-change {
    font-size: 13px;
    color: #007cbe;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 6px 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.patient-bar-change svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.patient-bar-change.open svg {
    transform: rotate(180deg);
}

/* Patient Dropdown */
.patient-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 50;
    padding: 8px;
    border-top: 1px solid #f0f0f0;
    max-height: 240px;
    overflow-y: auto;
}

.patient-dropdown.open {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.patient-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.patient-option:hover {
    background: #f5f7fa;
}

.patient-option.selected {
    background: #e0f0ff;
}

.patient-option-icon {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.patient-option.selected .patient-option-icon {
    background: #007cbe;
    color: white;
}

.patient-option-icon svg {
    width: 18px;
    height: 18px;
    color: #9ca3af;
}

.patient-option.selected .patient-option-icon svg {
    color: white;
}

.patient-option-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.patient-option-badge {
    font-size: 11px;
    color: #9ca3af;
    background: #f0f0f0;
    padding: 1px 8px;
    border-radius: 4px;
}

.patient-option.selected .patient-option-badge {
    color: #007cbe;
    background: #e0f0ff;
}

.patient-option-check {
    width: 20px;
    height: 20px;
    color: #007cbe;
    display: none;
}

.patient-option.selected .patient-option-check {
    display: block;
}

.patient-add-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px dashed #d1d5db;
    background: none;
    width: 100%;
    margin-top: 4px;
    transition: border-color 0.15s, background 0.15s;
}

.patient-add-btn:hover {
    border-color: #007cbe;
    background: #f5f9ff;
}

.patient-add-icon {
    width: 32px;
    height: 32px;
    border: 1.5px dashed #007cbe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007cbe;
    font-size: 18px;
    flex-shrink: 0;
}

.patient-add-text {
    font-size: 14px;
    color: #007cbe;
    font-weight: 500;
}

/* Overlay for dropdown */
.patient-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
}

.patient-overlay.open {
    display: block;
}

/* Family Modal Styles */
.family-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.family-modal.open {
    display: flex;
}

.family-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.family-modal-content {
    position: relative;
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px 16px;
    width: 100%;
    max-width: 500px;
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.family-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.family-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.family-modal-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.family-form-group {
    margin-bottom: 10px;
}

.family-form-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.family-form-label .required {
    color: #C94A05;
    font-size: 12px;
}

.family-form-input,
.family-form-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s;
}

.family-form-input:focus,
.family-form-select:focus {
    outline: none;
    border-color: #007cbe;
}

.family-form-select {
    appearance: none;
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 12px center;
    background-size: 18px;
}

.family-gender-group {
    display: flex;
    gap: 8px;
}

.family-gender-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.family-gender-btn.selected {
    border-color: #007cbe;
    background: #e0f0ff;
    color: #007cbe;
    font-weight: 500;
}

.family-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.family-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.family-btn-secondary {
    background: #f3f4f6;
    color: #666;
}

.family-btn-primary {
    background: #007cbe;
    color: white;
}

.family-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.family-form-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
}

.family-field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

.family-form-input.is-invalid {
    border-color: #dc2626;
}

.family-tab-content {
    display: block;
}

.multi-menu-bar {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 36rem;
    z-index: 100;
    box-sizing: border-box;
}

.multi-menu-bar-content {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 500px;
}

.multi-menu-bar-content span {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.multi-menu-next-btn {
    padding: 10px 32px;
    background: #007cbe;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.multi-menu-next-btn:hover {
    background: #006aa3;
}
