/* 预约模块样式 */

/* 通用样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background-color: #4CAF50;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 0.8rem;
    text-align: center;
}

/* 操作栏样式 */
.action-bar {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.action-bar .btn {
    margin-right: 10px;
}

/* 筛选栏样式 */
.filter-bar {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.8rem;
}

.filter-item select,
.filter-item input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 视图切换样式 */
.view-toggle {
    margin-bottom: 20px;
    text-align: right;
}

.view-toggle button {
    margin-left: 10px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.view-toggle button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 列表视图样式 */
.table-container {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th,
.table-container td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 0.8rem;
}

.table-container th {
    background-color: #f2f2f2;
    font-weight: bold;
    font-size: 0.8rem;
}

.table-container tr:hover {
    background-color: #f5f5f5;
}

/* 卡片视图样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.booking-card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    transition: transform 0.2s;
}

.booking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.booking-card h3 {
    margin-top: 0;
    font-size: 0.8rem;
    color: #333;
}

.booking-card .card-info {
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.booking-card .card-info label {
    font-weight: bold;
    margin-right: 5px;
}

/* 日历视图样式 */
.calendar-container {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h2 {
    margin: 0;
    font-size: 0.8rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
}

.calendar-day {
    background-color: white;
    padding: 10px;
    min-height: 100px;
    position: relative;
}

.calendar-day.other-month {
    background-color: #f5f5f5;
}

.calendar-day .day-number {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-day .booking-item {
    font-size: 0.8rem;
    padding: 2px 5px;
    margin-bottom: 2px;
    border-radius: 2px;
    background-color: #e3f2fd;
    cursor: pointer;
}

/* 状态样式 */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status.pending {
    background-color: #ffeb3b;
    color: #333;
}

.status.confirmed {
    background-color: #2196f3;
    color: white;
}

.status.completed {
    background-color: #4caf50;
    color: white;
}

.status.cancelled {
    background-color: #f44336;
    color: white;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons button {
    padding: 4px 8px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.action-buttons button:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: #2196f3;
    color: white;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

/* 图片样式 */
.image-group {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.img-zoom {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.img-zoom:hover {
    transform: scale(1.05);
}

/* 模态框样式 */
.modal-content {
    border-radius: 4px;
}

.modal-header {
    background-color: #4CAF50;
    color: white;
    border-bottom: none;
}

.modal-header .close {
    color: white;
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 日期选择器下拉菜单样式 */
.day-select-dropdown {
    position: relative;
}

.day-select-dropdown option {
    padding: 5px 10px;
}

/* 控制下拉菜单高度 */
.day-select-dropdown {
    max-height: 300px;
    overflow-y: auto;
}

/* 统一label样式 */
.form-label-custom {
    min-width: 60px;
    width: 60px;
    text-align: justify;
    text-justify: distribute-all-lines;
    text-align-last: justify;
    white-space: nowrap;
}

/* 服务类型单选框样式 */
.form-check {
    width: 45%;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    margin: 0;
}

.form-check-input {
    vertical-align: middle;
    margin-top: 0;
}

.form-check-label {
    font-size: 0.8rem;
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
    margin-bottom: 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.pagination button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-item {
        min-width: 100%;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
}