/* jQuery UI Datepicker 樣式修正 */
.ui-datepicker {
    width: 100%;
    max-width: 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px;
    font-family: 'Noto Sans TC', 'Roboto', sans-serif;
}

.ui-datepicker-header {
    background: #f8f9fa;
    border: none;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.ui-datepicker-title {
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    top: 10px !important;
    cursor: pointer;
}

.ui-datepicker-prev {
    left: 10px !important;
}

.ui-datepicker-next {
    right: 10px !important;
}

.ui-datepicker-calendar {
    width: 100%;
    border-collapse: collapse;
}

.ui-datepicker-calendar th {
    padding: 8px 0;
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.ui-datepicker-calendar td {
    padding: 5px;
    text-align: center;
}

.ui-datepicker-calendar td a,
.ui-datepicker-calendar td span {
    display: block;
    padding: 8px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.2s;
}

.ui-datepicker-calendar td a:hover {
    background: #007bff;
    color: #fff;
}

.ui-state-active {
    background: #007bff !important;
    color: #fff !important;
}

.ui-state-highlight {
    background: #e3f2fd !important;
    color: #007bff !important;
    font-weight: 600;
}

.ui-state-disabled span {
    color: #ccc !important;
    cursor: not-allowed;
}

/* 修正日期選擇器在 modal 中的顯示 */
.ui-datepicker {
    z-index: 9999 !important;
}

/* 確保日期選擇器響應式 */
@media (max-width: 768px) {
    .ui-datepicker {
        max-width: 280px;
        font-size: 14px;
    }
    
    .ui-datepicker-calendar td a,
    .ui-datepicker-calendar td span {
        padding: 6px;
    }
}

/* 修正預約頁面的特定樣式 */
.booked_timeline_div {
    position: relative;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.booked_timeline {
    position: relative;
    height: 40px;
    background: #e9ecef;
    border-radius: 20px;
    overflow: hidden;
}

.booked_highlight {
    position: absolute;
    height: 100%;
    background: #dc3545;
    opacity: 0.7;
}

.booked_ticks {
    position: relative;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    height: 20px;
}

.booked_ticks span {
    position: absolute;
    transform: translateX(-50%);
    font-weight: 500;
    white-space: nowrap;
}

.booked_status {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    list-style: none;
    padding: 0;
}

.booked_status li {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.booked_status li::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 3px;
    background: #e9ecef;
}

.booked_status li.booked::before {
    background: #dc3545;
}

/* 修正空間預約表單的布局 */
.space_booked {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.space_booked_top {
    background: #007bff;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border-radius: 10px 10px 0 0;
    margin: -20px -20px 20px -20px;
}

/* 修正表單控件樣式 */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    font-size: 16px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* 修正按鈕樣式 */
.btn-primary {
    background: #007bff;
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.btn-block-fat {
    padding: 15px;
    font-size: 18px;
    margin-top: 30px;
}

/* 時間軸無預訂訊息 */
.no-bookings-message {
    text-align: center;
    color: #28a745;
    font-weight: 500;
    line-height: 40px;
    font-size: 14px;
}

/* 改善時間軸工具提示 */
.booked_highlight {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.booked_highlight:hover {
    opacity: 0.9;
}