/* 报餐页面样式 */

/* 主要内容区域 */
.container {
    margin: 10px;
}

/* 日期选择 */
.date-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 日期标签页 */
.date-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.date-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.date-tab {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 12px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.date-tab.active {
    background: #FF6634;
    color: white;
    border-color: #FF6634;
}

.date-tab .day {
    font-weight: 600;
    margin-bottom: 4px;
}

.date-tab .date {
    font-size: 12px;
    opacity: 0.8;
}

.date-tab.active .date {
    opacity: 1;
}

/* 餐次选择 */
.meal-selection {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.meal-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meal-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.meal-option:hover {
    border-color: #FF6634;
    background: #fff7ed;
}

.meal-option.selected {
    border-color: #FF6634;
    background: #fff7ed;
}

.meal-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

.meal-option.disabled:hover {
    border-color: #f3f4f6;
    background: #f3f4f6;
}

.meal-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.meal-icon.breakfast {
    background: #fef3c7;
}

.meal-icon.lunch {
    background: #fed7d7;
}

.meal-icon.dinner {
    background: #e0e7ff;
}

.meal-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.meal-details p {
    font-size: 14px;
    color: #666;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-left: auto;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meal-option.selected .checkbox {
    background: #FF6634;
    border-color: #FF6634;
}

.meal-option.selected .checkbox::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox.checked {
    background: #FF6634;
    border-color: #FF6634;
}

.checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 提交按钮区域 */
.submit-section {
    margin: 0 10px; /* 与 .container 相同的左右边距 */
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 80px; /* 为底部导航栏留出空间 */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #FF6634 0%, #E55A2B 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 102, 52, 0.2);
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #E55A2B 0%, #D4491F 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 102, 52, 0.3);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled,
.submit-btn.disabled {
    background: #d1d5db !important;
    cursor: not-allowed !important;
    color: #9ca3af !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 确保禁用状态的样式优先级最高 */
.submit-btn:disabled:hover,
.submit-btn.disabled:hover {
    background: #d1d5db !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 简化提示弹窗样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 24px 32px;
    border-radius: 16px;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 28px;
    font-weight: bold;
    min-width: 28px;
    text-align: center;
}

.toast-message {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* 成功状态 */
.toast.success .toast-icon {
    color: #10B981;
}

/* 错误状态 */
.toast.error .toast-icon {
    color: #EF4444;
}

.toast.error {
    background: rgba(220, 38, 38, 0.9);
}

/* 日期选择器（旧版，保留向后兼容） */
.date-selector {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.date-btn {
    flex: 1;
    padding: 16px 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.date-btn:hover {
    border-color: #FF6634;
    background: #fff7ed;
}

.date-btn.active {
    border-color: #FF6634;
    background: #FF6634;
    color: white;
}

.date-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.date-value {
    font-size: 12px;
    opacity: 0.8;
}

.date-btn.active .date-value {
    opacity: 1;
}

/* 自定义日期选择器 */
.custom-date-picker {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.meal-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.meal-name {
    font-size: 16px;
    font-weight: 500;
}

.meal-time {
    font-size: 14px;
    color: #666;
}

.meal-restriction {
    background: #fff7ed;
    border: 1px solid #fb923c;
    color: #9a3412;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meal-restriction.error {
    background: #fee2e2;
    border-color: #dc2626;
    color: #dc2626;
}

.meal-restriction.success {
    background: #d1fae5;
    border-color: #065f46;
    color: #065f46;
}

.already-ordered {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}

.meal-option {
    background: white;
}

/* 响应式样式 */
@media (max-width: 480px) {
    .container {
        margin: 10px;
    }

    .date-section,
    .meal-selection,
    .submit-section {
        padding: 16px;
    }

    .date-selector {
        flex-direction: column;
        gap: 8px;
    }

    .meal-option {
        padding: 12px;
    }

    .meal-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .meal-name {
        font-size: 15px;
    }

    .meal-time {
        font-size: 13px;
    }
} 