/* 共餐活動詳情頁面樣式 */

/* 頂部導航 */
.meal-detail-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2E9A9A 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.meal-detail-header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meal-detail-header .page-title {
    color: var(--white);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.share-btn {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.share-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

/* 主要內容 */
.meal-detail-main {
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* 活動資訊區 */
.event-info-section {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.event-detail-title {
    font-size: 24px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.event-detail-restaurant {
    color: var(--primary-color);
    font-size: 18px; /* 增大字型 */
    font-weight: 500;
    margin-bottom: 20px;
}

.event-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px; /* 增大字型 */
    color: var(--text-primary);
}

.event-meta-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.event-description {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 16px; /* 增大字型 */
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 進度指示器 */
.progress-section {
    margin-bottom: 25px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: #ddd;
    z-index: 1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active::after {
    background: var(--primary-color);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px; /* 增大字型 */
    margin-bottom: 8px;
    z-index: 2;
    position: relative;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: var(--primary-color);
}

.progress-step.completed .step-number {
    background: var(--secondary-color);
}

.step-label {
    font-size: 14px; /* 增大字型 */
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: color 0.3s;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

/* 內容區域 */
.content-section {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.content-title {
    font-size: 20px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

/* 餐廳選項（多店投票） */
.restaurant-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.restaurant-option {
    border: 2px solid var(--light-bg);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.restaurant-option:hover {
    border-color: var(--secondary-color);
    background: rgba(64, 224, 208, 0.05);
}

.restaurant-option.selected {
    border-color: var(--primary-color);
    background: rgba(46, 139, 139, 0.1);
}

.restaurant-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.restaurant-option-name {
    font-size: 18px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
}

.restaurant-option-votes {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px; /* 增大字型 */
    font-weight: 500;
}

.restaurant-option-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.restaurant-option-tag {
    background: var(--light-bg);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 菜單選項 */
.menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-category {
    margin-bottom: 20px;
}

.menu-category-title {
    font-size: 18px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-bg);
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    border: 2px solid var(--light-bg);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item:hover {
    border-color: var(--secondary-color);
    background: rgba(64, 224, 208, 0.05);
}

.menu-item.selected {
    border-color: var(--primary-color);
    background: rgba(46, 139, 139, 0.1);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.menu-item-name {
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
}

.menu-item-price {
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    color: var(--primary-color);
}

.menu-item-description {
    font-size: 14px; /* 增大字型 */
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 參與者列表 */
.participants-section {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.participants-title {
    font-size: 20px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.participant-item {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.participant-name {
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.participant-choice {
    font-size: 14px; /* 增大字型 */
    color: var(--text-secondary);
}

/* 底部操作區 */
.meal-detail-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border-top: 1px solid rgba(46, 139, 139, 0.2);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.action-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    gap: 15px;
}

.action-btn-full {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 18px; /* 增大字型 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 60px;
}

.action-btn-full:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 139, 0.3);
}

.action-btn-full:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn-secondary {
    background: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 確認對話框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid var(--light-bg);
}

.modal-header h3 {
    font-size: 20px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background: var(--light-bg);
}

.modal-body {
    padding: 20px;
    font-size: 16px; /* 增大字型 */
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px 20px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: var(--white);
}

/* 響應式設計 */
@media (min-width: 481px) and (max-width: 768px) {
    .meal-detail-main {
        max-width: 600px;
        padding: 25px;
        padding-bottom: 120px;
    }
    
    .action-container {
        max-width: 600px;
        padding: 20px 25px;
    }
    
    .event-detail-title {
        font-size: 26px;
    }
    
    .restaurant-option-name {
        font-size: 20px;
    }
    
    .menu-item-name {
        font-size: 18px;
    }
}

@media (min-width: 769px) {
    .meal-detail-main {
        max-width: 800px;
        padding: 30px;
        padding-bottom: 140px;
    }
    
    .action-container {
        max-width: 800px;
        padding: 25px 30px;
        gap: 20px;
    }
    
    .event-detail-title {
        font-size: 28px;
    }
    
    .restaurant-option-name {
        font-size: 22px;
    }
    
    .menu-item-name {
        font-size: 20px;
    }
    
    .action-btn-full {
        min-height: 70px;
        font-size: 20px;
    }
}

/* 觸控友善 */
@media (hover: none) and (pointer: coarse) {
    .restaurant-option:hover,
    .menu-item:hover {
        border-color: var(--light-bg);
        background: transparent;
    }
    
    .action-btn-full:hover {
        transform: none;
        box-shadow: none;
    }
}
