/* 發起共餐頁面樣式 */

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

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

.start-meal-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);
}

.help-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));
}

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

/* 進度指示器 */
.progress-section {
    background: var(--white);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 80px;
    z-index: 50;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 25%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

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

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

/* 步驟區域 */
.step-section {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.step-title {
    font-size: 24px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    text-align: center;
}

.step-description {
    font-size: 16px; /* 增大字型 */
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

/* 模式選擇 */
.mode-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mode-option {
    border: 2px solid var(--light-bg);
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

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

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

.mode-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

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

.mode-description {
    font-size: 16px; /* 增大字型 */
    color: var(--text-secondary);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.mode-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.feature {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px; /* 增大字型 */
    font-weight: 500;
}

.mode-option.selected .feature {
    background: var(--primary-color);
    color: var(--white);
}

/* 餐廳搜尋 */
.restaurant-search {
    margin-bottom: 20px;
}

.restaurant-search .search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: 25px;
    padding: 0 15px;
}

.restaurant-search .search-icon {
    color: var(--text-secondary);
    margin-right: 10px;
}

.restaurant-search input {
    flex: 1;
    border: none;
    background: none;
    padding: 12px 0;
    font-size: 16px; /* 增大字型 */
    color: var(--text-primary);
    outline: none;
}

.restaurant-search input::placeholder {
    color: var(--text-secondary);
}

/* 餐廳列表 */
.restaurant-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

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

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

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

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

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

.restaurant-item-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.restaurant-item.selected .restaurant-item-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

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

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

/* 已選餐廳 */
.selected-restaurants {
    margin-top: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    padding: 15px;
}

.selected-restaurants h4 {
    font-size: 16px; /* 增大字型 */
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

.selected-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 8px;
    padding: 12px 15px;
}

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

.remove-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #ff4444;
    color: var(--white);
}

/* 表單樣式 */
.event-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.form-input,
.form-textarea {
    border: 2px solid var(--light-bg);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px; /* 增大字型 */
    color: var(--text-primary);
    background: var(--white);
    transition: border-color 0.3s;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

/* 截止時間組（多店投票時顯示） */
#deadlineGroup {
    display: none;
}

#deadlineGroup.show {
    display: flex;
}

/* 總結卡片 */
.summary-card {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section:last-child {
    margin-bottom: 0;
}

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

.summary-content {
    font-size: 16px; /* 增大字型 */
    color: var(--text-secondary);
    line-height: 1.6;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-label {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-value {
    color: var(--text-secondary);
}

/* 條款區域 */
.terms-section {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px; /* 增大字型 */
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--light-bg);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked ~ .checkmark::after {
    display: block;
}

/* 底部操作區 */
.start-meal-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;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary: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);
}

.btn-primary:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.5 !important;
    pointer-events: none;
}

.btn-primary:disabled:hover {
    background: #ccc !important;
    transform: none !important;
    box-shadow: none !important;
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 139, 139, 0.3);
}

/* 成功對話框 */
.success-content {
    text-align: center;
    padding: 30px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

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

.success-content p {
    font-size: 16px; /* 增大字型 */
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}

.invite-link-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.invite-link {
    flex: 1;
    border: 2px solid var(--light-bg);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--light-bg);
    outline: none;
}

.copy-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.success-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.success-actions .btn-primary,
.success-actions .btn-secondary {
    min-height: 50px;
    font-size: 16px;
}

/* 響應式設計 */
@media (min-width: 481px) and (max-width: 768px) {
    .start-meal-main {
        max-width: 600px;
        padding: 25px;
        padding-bottom: 120px;
    }
    
    .action-container {
        max-width: 600px;
        padding: 20px 25px;
    }
    
    .step-title {
        font-size: 26px;
    }
    
    .mode-title {
        font-size: 22px;
    }
    
    .form-row {
        gap: 20px;
    }
}

@media (min-width: 769px) {
    .start-meal-main {
        max-width: 800px;
        padding: 30px;
        padding-bottom: 140px;
    }
    
    .action-container {
        max-width: 800px;
        padding: 25px 30px;
        gap: 20px;
    }
    
    .step-title {
        font-size: 28px;
    }
    
    .mode-title {
        font-size: 24px;
    }
    
    .mode-options {
        flex-direction: row;
        gap: 30px;
    }
    
    .mode-option {
        flex: 1;
    }
    
    .form-row {
        gap: 25px;
    }
    
    .btn-primary,
    .btn-secondary {
        min-height: 70px;
        font-size: 20px;
    }
    
    .progress-bar {
        max-width: 800px;
    }
}

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

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-section {
    animation: fadeInUp 0.5s ease-out;
}
