/* 登入表單樣式 */
.smb-login-box {
    max-width: 400px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.smb-login-box h2 {
    margin-top: 0;
    text-align: center;
}

.smb-login-form p {
    margin-bottom: 15px;
}

.smb-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.smb-login-form input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.smb-login-form input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #CD907E;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.smb-login-form input[type="submit"]:hover {
    background: #B87A68;
}

/* 訊息樣式 */
.smb-error {
    padding: 10px 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 20px;
}

.smb-success {
    padding: 10px 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 日曆容器 */
.smb-calendar-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.smb-member-info {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.smb-member-info h3 {
    margin-top: 0;
}

.smb-current-booking {
    background: #e7f3ff;
    padding: 15px;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.smb-current-booking h4 {
    margin-top: 0;
}

.smb-no-booking {
    background: #fff3cd;
    padding: 15px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

/* 週一到週五表頭 */
.smb-weekday-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 10px;
    margin-top: 15px;
}

.weekday-label {
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    color: #555;
    padding: 8px 0;
    background: #f8f8f8;
    border-radius: 4px;
}

/* 日曆週行樣式 */
.smb-week-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.smb-date-cell {
    padding: 20px 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.smb-date-cell:hover {
    border-color: #CD907E;
    box-shadow: 0 2px 8px rgba(205, 144, 126, 0.3);
    transform: translateY(-2px);
}

.smb-date-cell.current-booking {
    background: #FFF5F2;
    border-color: #CD907E;
    border-width: 3px;
}

/* 已禁用日期樣式 - 完全不可選擇 */
.smb-date-cell.disabled {
    background: #fafafa !important;
    border-color: #f0f0f0 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    pointer-events: none !important; /* 完全禁用所有點擊事件 */
}

.smb-date-cell.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #f0f0f0 !important;
}

.smb-date-cell.disabled .date-label {
    color: #d0d0d0 !important;
}

.smb-date-cell.disabled .date-quota {
    color: #d5d5d5 !important;
}

/* 過去日期 - 完全不可選擇 */
.smb-date-cell.past-date {
    background: #fcfcfc !important;
    border-color: #f5f5f5 !important;
    pointer-events: none !important; /* 完全禁用所有點擊事件 */
}

.smb-date-cell.past-date .date-label {
    color: #d5d5d5 !important;
}

/* 今日 - 完全不可選擇 */
.smb-date-cell.today-date {
    background: #fafbfc !important;
    border-color: #f0f2f5 !important;
    pointer-events: none !important; /* 完全禁用所有點擊事件 */
}

.smb-date-cell.today-date .date-label {
    color: #d0d5db !important;
}

/* 明日 - 完全不可選擇，與過去日期和今日一樣的禁用樣式 */
.smb-date-cell.tomorrow-date {
    background: #fcfcfc !important;
    border-color: #f0f0f0 !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important; /* 完全禁用所有點擊事件 */
}

.smb-date-cell.tomorrow-date:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #f0f0f0 !important;
}

.smb-date-cell.tomorrow-date .date-label {
    color: #d0d0d0 !important;
}

/* 日期標籤（已過期、今日、明日） */
.date-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e8e8e8;
    color: #999;
    font-weight: 500;
}

.smb-date-cell.past-date .date-tag {
    background: #f0f0f0;
    color: #bbb;
}

.smb-date-cell.today-date .date-tag {
    background: #e8f0f8;
    color: #aac5d8;
}

.smb-date-cell.tomorrow-date .date-tag {
    background: #f0f0f0;
    color: #bbb;
}

/* 已滿日期 */
.smb-date-cell.full {
    background: #f8f8f8 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

.smb-date-cell.full:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #e0e0e0 !important;
}

.date-label {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
}

.date-quota {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-weight: 500;
}

.smb-date-cell.full .date-quota {
    color: #999;
    font-weight: normal;
}

/* 訊息區域 */
#smb-booking-message {
    margin-top: 20px;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .smb-weekday-header {
        gap: 10px;
    }
    
    .weekday-label {
        font-size: 14px;
        padding: 6px 0;
    }
    
    .smb-week-row {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    
    .smb-date-cell {
        padding: 15px 10px;
        min-height: 90px;
        font-size: 14px;
    }
    
    .date-label {
        font-size: 15px;
    }
    
    .date-tag {
        font-size: 9px;
        padding: 1px 4px;
    }
}

@media (max-width: 768px) {
    .smb-calendar-container {
        padding: 10px;
    }
    
    .smb-weekday-header {
        gap: 8px;
    }
    
    .weekday-label {
        font-size: 13px;
        padding: 5px 0;
    }
    
    .smb-week-row {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .smb-date-cell {
        padding: 12px 8px;
        min-height: 85px;
        font-size: 13px;
    }
    
    .date-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .date-quota {
        font-size: 11px;
    }
    
    .date-tag {
        font-size: 8px;
        padding: 1px 3px;
        top: 3px;
        right: 3px;
    }
}

@media (max-width: 480px) {
    .smb-weekday-header {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .weekday-label {
        font-size: 14px;
    }
    
    .smb-week-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .smb-date-cell {
        padding: 15px 10px;
        min-height: 90px;
    }
    
    .date-label {
        font-size: 15px;
    }
    
    .date-quota {
        font-size: 12px;
    }
}