/**
 * 預約頁面折疊式步驟系統
 * 節省空間，改善使用體驗
 */

/* 卡片基本樣式 */
.booking-card {
    transition: all 0.3s ease;
    position: relative;
}

/* 卡片標題區域 */
.booking-card .card-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 20px;
    margin: -20px;
    margin-bottom: 20px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.booking-card .card-title-wrapper:hover {
    background-color: rgba(252, 49, 48, 0.05);
}

/* 標題左側內容 */
.booking-card .card-title-content {
    flex: 1;
}

.booking-card .card-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 步驟編號 */
.booking-card .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.booking-card.active .step-number {
    background: #FC3130;
    color: white;
}

.booking-card.completed .step-number {
    background: #4CAF50;
    color: white;
}

.booking-card.completed .step-number::before {
    content: '✓';
}

.booking-card.completed .step-number span {
    display: none;
}

/* 已選擇的摘要 */
.booking-card .selected-summary {
    display: none;
    margin-top: 8px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 18px;
    color: #666;
}

.booking-card.completed.collapsed .selected-summary {
    display: block;
}

/* 折疊/展開圖示 */
.booking-card .toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #999;
}

.booking-card.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* 卡片內容區域 */
.booking-card .card-content {
    max-height: 5000px;
    overflow: visible;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.booking-card.collapsed .card-content {
    max-height: 0;
    opacity: 0;
}

/* 禁用狀態 */
.booking-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.booking-card.disabled .card-title-wrapper {
    cursor: not-allowed;
}

/* 預約摘要卡片不折疊 */
.booking-summary .card-title-wrapper {
    cursor: default;
    pointer-events: none;
}

.booking-summary .toggle-icon {
    display: none;
}

/* 手機版優化 */
@media (max-width: 768px) {
    .booking-card:not(.booking-summary) .card-title-wrapper {
        padding: 16px;
        margin: -16px;
        margin-bottom: 16px;
    }
    
    .booking-card .step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .booking-card .selected-summary {
        font-size: 18px;
        padding: 10px;
    }
}

/* 動畫效果：移除 animation，只使用 transition 以避免衝突 */
