/* 御膳房 · 主题样式 - 变量化版本 */
:root {
    /* 主色调：明亮蓝色 */
    --primary-color: #41ad3e;
    --primary-dark: #2563eb;
    --primary-deep: #1f567d;
    --primary-light: #eff6ff;
    --primary-text-light: #578aa8;

    /* 背景色 */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-tab-inactive: #f1f5f9;
    --bg-gray-light: #f0f6fc;
    --bg-gray-lighter: #eef3fa;
    --bg-highlight: #e9f3fa;
    --bg-toast: var(--primary-color);
    --bg-cart-icon: var(--primary-color);
    --bg-confirm-btn: var(--primary-color);
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --bg-delete-light: #fff0f0;
    --bg-datepicker-nav: #f8fafc;
    --bg-empty-state: transparent;

    /* 文字颜色 */
    --text-primary: #1a3a4f;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-heading: #1f567d;
    --text-link: var(--primary-color);
    --text-white: #ffffff;
    --text-dark: #1e293b;
    --text-delete: #ff4d4f;

    /* 边框与分割线 */
    --border-light: #e2eef9;
    --border-card: #e2eef9;
    --border-input: #cde2f0;
    --border-focus: var(--primary-color);

    /* 状态色 */
    --success-color: #2c7cb6;
    --warning-orange: #d44c2f;
    --delete-red: #ff4d4f;
    --delete-red-dark: #e04345;

    /* 阴影变量 */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-focus: 0 0 0 2px #fff, 0 0 0 4px var(--primary-color);
    --shadow-btn: 0 2px 6px rgba(44, 124, 182, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

:root {
    --topbar-height: 130px;
    --bottom-bar-height: 76px;
}

.swipe-container,
.app-container,
.dishes-sidebar,
.dishes-main,
#orderedContainer,
#reviewsListContainer,
.cart-items,
.comment-list,
.swipe-page,
.dishes-grid,
.order-items-list,
.modal-content,
.datepicker-panel,
.calendar-days,
.taste-groups-container {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.swipe-container::-webkit-scrollbar,
.app-container::-webkit-scrollbar,
.dishes-sidebar::-webkit-scrollbar,
.dishes-main::-webkit-scrollbar,
#orderedContainer::-webkit-scrollbar,
#reviewsListContainer::-webkit-scrollbar,
.cart-items::-webkit-scrollbar,
.comment-list::-webkit-scrollbar,
.swipe-page::-webkit-scrollbar,
.dishes-grid::-webkit-scrollbar,
.order-items-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.datepicker-panel::-webkit-scrollbar,
.calendar-days::-webkit-scrollbar,
.taste-groups-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-family: system-ui, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; 
    position: relative;
}

.global-topbar {
    flex-shrink: 0; 
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.logo-area {
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: height 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1),
                padding 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1),
                opacity 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    overflow: hidden;
    will-change: height, padding;
}

.logo-area.collapsed {
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.logo-area * {
    transition: none !important;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    padding: 0.75rem 1.2rem 1rem;
    background: transparent;
    transition: margin-top 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.logo-area img {
    width: 70px;
    height: 70px;
    border-radius: 1rem;
    object-fit: cover;
}

.introduction {
    flex: 1;
    justify-content: center;
    align-items: center;
    height: auto;
    padding: 0 0.5rem;
    display: baseline;
}

.introduction h1 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.introduction span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.tab-btn {
    flex: 1;
    background: var(--bg-tab-inactive);
    border: none;
    padding: 0.6rem 0;
    border-radius: 44px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

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

.app-layout {
    display: flex;
    width: 100%;
    flex: 1;
}

.nav-sidebar {
    width: auto;
    background: var(--bg-sidebar);
    position: sticky;
    top: 130px;
    overflow-y: auto;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

/* 分类侧边栏 - 精致版激活动画 */
.category-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: transform 0.3s ease;
    white-space: nowrap;
    background: none;
}

.category-item.active {
    background: var(--bg-body);
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
}


.category-item.active::before {
    content: '';
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
}



.main-content {
    flex: 1;
    padding: 1rem 1rem 1rem 1rem;
    touch-action: pan-y;
    will-change: scroll-position;
}

.dishes-view,
.reviews-view,
.ordered-view {
    display: none;
}

.dishes-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.dish-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 10px;
    margin: 0 0.5rem;
    transition: 0.2s;
    cursor: pointer;
    align-items: stretch;
}

.dish-card .dish-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.dish-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    justify-content: space-between;
    min-height: 90px; 
}

.dish-card .dish-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
}

.dish-card .dish-desc {
    font-size: 0.7rem;
    color: var(--primary-text-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dish-card .add-cart-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-gray-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    align-self: flex-end;
    margin-top: auto;
    transition: 0.2s;
    flex-shrink: 0;
}

.dish-card .add-cart-btn i {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0;
}

.order-summary-card {
    background: var(--bg-card);
    border-radius: 16px;
    margin: 0 0.5rem 0.5rem;
    overflow: hidden;
}

.order-header {
    background: none;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    line-height: 1.2;
}

.order-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.order-status-bar {
    display: flex;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    align-items: center;
}

.order-status-bar i {
    font-size: 1.1rem;
    margin-right: 4px;
}

.order-status-bar.is-making {
    background: var(--bg-card);
    color: #c2410c;
}

.order-status-bar.is-completed {
    background: var(--bg-card);
    color: var(--primary-color);
}

.delete-comment-direct-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 30px;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-comment-direct-btn:active {
    transform: scale(0.92);
}

.order-time,
.order-total,
.delete-order-btn {
    font-size: 0.8rem;
    color: var(--primary-color);
    background: none;
    padding: 0;
    font-weight: 500;
}

.order-items-list {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-dish-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-gray-light);
}

.order-dish-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    flex-wrap: wrap;
    gap: 8px;
}

.order-dish-info {
    flex: 2;
}

.order-dish-name {
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: baseline;
}

.order-dish-meta {
    font-size: 0.65rem;
    color: var(--primary-text-light);
    margin-top: 4px;
}

.order-dish-qty {
    background: var(--bg-gray-lighter);
    padding: 2px 8px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.8rem;
    align-items: center;
}

.comment-on-dish-btn {
    background: var(--bg-highlight);
    border: none;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
}

.empty-ordered i,
.empty-reviews i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-ordered,
.empty-reviews {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--primary-text-light);
    height: 100%;
}

.ordered-view,
.reviews-view {
    display: none;
    height: 100%;
}

.ordered-view:not([style*="display: none"]),
.reviews-view:not([style*="display: none"]) {
    display: block;
    height: 100%;
}



#orderedContainer:has(.order-summary-card) {
    min-height: auto;
}

.toast-message {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-toast);
    color: var(--text-white);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    z-index: 1300;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.bottom-action-bar {
    position: fixed;
    bottom: 0.8rem;
    left: 3%;
    right: 3%;
    width: 94%;
    border-radius: 3rem;
    margin: 0 auto;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    z-index: 110;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.5);
}


.bottom-action-bar:active {
    transform: scale(0.98);
}

.cart-info-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon-wrapper {
    position: relative;
    background: var(--bg-cart-icon);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-items: center;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
}

.cart-icon-wrapper i {
    font-size: 20px;
}

.cart-badge-new {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff8866;
    color: var(--text-white);
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: bold;
}

.cart-summary-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-heading);
}

.cart-summary-text span {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

.confirm-order-bar-btn {
    background: var(--bg-confirm-btn);
    padding: 10px 18px;
    border-radius: 50px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.confirm-order-bar-btn i {
    font-size: 1.1rem;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    visibility: hidden;
    transition: background 0.2s, visibility 0.2s;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.cart-overlay.show {
    visibility: visible;
    background: var(--bg-overlay);
}
/* 横线关闭区域 */
.cart-drag-bar {
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    cursor: pointer;
}

.drag-indicator {
    width: 3rem;
    height: 0.3rem;
    background: var(--border-light, #cbd5e1);
    border-radius: 4px;
    transition: background 0.2s;
}

/* 新的标题栏 */
.cart-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.8rem;
}

.cart-title-bar h3 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    margin: 0;
}

/* 清空按钮 - 使用现有主题色 */
.clear-cart-btn {
    background: none;
    border: none;
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.cart-panel {
    width: 100%;
    height: 75%;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.cart-overlay.show .cart-panel {
    transform: translateY(0);
}

.cart-header {
    padding: 1.2rem 1.2rem 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.close-cart,
.modal-close-btn {
    background: var(--bg-gray-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-text-light);
    font-weight: 500;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* 购物车卡片新布局 */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 16px;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-gray-light);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.cart-item-taste {
    font-size: 0.7rem;
    color: var(--primary-text-light);
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cart-item-taste span {
    color: var(--bg-gray);
}

.cart-item-remark {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 右侧数量控制器 */
.cart-item-quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cart-item-quantity-control .qty-btn {
    background: var(--bg-gray-light);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 32px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: 0.1s;
}

.cart-item-quantity {
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 28px;
    text-align: center;
    color: var(--text-primary);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.qty-btn,
.remove-item,
.edit-item-btn {
    background: var(--bg-gray-light);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: 0.1s;
    font-size: 0.9rem;
}

.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1200;
    visibility: hidden;
    transition: background 0.2s ease, visibility 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.modal.show {
    visibility: visible;
    background: var(--bg-overlay);
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    height: 90%;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    will-change: transform;
    position: relative;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-body {
    padding: 1rem;
}

.modal-body h2 {
    margin-bottom: 1rem;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 40px;
    color: #333;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.modal-close:active {
    transform: scale(0.94);
}

.modal-img {
    width: 100%;
    aspect-ratio: 4/3; 
    object-fit: cover;
    background-color: var(--bg-gray-light); 
}

.comments-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
}

.commentstitle {
    margin: 1rem 0;
    font-weight: 600;
}

.comment-list {
    max-height: 200px;
    overflow-y: auto;
    background: #f9fdfe;
    padding: 6px;
}

.comment-item {
    background: var(--bg-card);
    padding: 8px 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-card);
}

.comment-name {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--primary-text-light);
    margin-bottom: 4px;
}

.review-card {
    background: var(--bg-card);
    margin: 0 0.5rem 0.5rem ;
    padding: 10px;
    border-radius: 16px;
}

.review-dish-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #f9f9f9;
}

.review-dish-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-gray-light);
}

.review-dish-details {
    flex: 1;
    min-width: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    align-content: center;
    gap: 6px;
}

.review-dish-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.review-time {
    font-size: 0.8rem;
    color: var(--primary-text-light);
}

.reviewer {
    font-size: 0.75rem;
    color: var(--primary-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-content-row {
    padding-top: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
}

.comment-custom-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1250;
    visibility: hidden;
    transition: background 0.2s ease, visibility 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.comment-custom-modal.show {
    visibility: visible;
    background: var(--bg-overlay);
}

/* 订单评价弹窗 - 自适应高度 */
.order-comment-modal .modal-content {
    height: auto;
    max-height: 90vh;  /* 限制最大高度，防止屏幕过小时溢出 */
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
}

/* 移除之前的固定高度设置，确保内容自适应 */
.comment-modal-content {
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-width: none;
}

/* 确保弹窗主体底部没有多余的留白 */
.comment-modal-body {
    padding: 1.2rem;
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
}

/* 优化触摸底栏的间距 */
.comment-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
    margin-bottom: 0;  /* 移除底部外边距 */
}

.comment-custom-modal.show .comment-modal-content {
    transform: translateY(0);
}

.comment-modal-header {
    padding: 1.2rem 1.2rem 0.5rem 1.2rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.comment-modal-header span {
    display: flex;
    align-items: center;
    gap: 6px;
}


.comment-input-group {
    margin-bottom: 1rem;
}

.comment-input-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    display: block;
    margin-bottom: 6px;
}

.comment-input-group input,
.comment-input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-input);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fefefe;
}


.btn-submit-comment {
    background: var(--primary-color);
    color: var(--text-white);
    flex: 1;
    padding: 10px 0;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-cancel-comment {
    background: var(--bg-gray-lighter);
    color: var(--primary-text-light);
    flex: 1;
    padding: 10px 0;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-submit-comment:active,
.btn-cancel-comment:active {
    transform: scale(0.97);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.taste-groups-container {
    margin: 1rem 0;
    border-top: 1px solid var(--border-light);
    padding-top: 0.8rem;
}

.taste-group {
    margin-bottom: 1.2rem;
}

.taste-group-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.taste-group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.taste-group-option {
    background: var(--bg-gray-light);
    border-radius: 40px;
    padding: 6px 18px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    color: var(--primary-deep);
}

.taste-group-option.selected {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-btn);
}

.remark-area {
    margin: 1rem 0;
}

.remark-area label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    display: block;
    margin-bottom: 6px;
}

.remark-area input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-input);
    background: #fefefe;
    font-size: 0.85rem;
}

.confirm-add-btn {
    width: 100%;
    background: var(--warning-orange);
    color: var(--text-white);
    border: none;
    padding: 12px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.confirm-add-btn:active {
    transform: scale(0.97);
    background: #b83e24;
}

.comment-menu-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-text-light);
    cursor: pointer;
    padding: 0 4px;
    margin-left: 8px;
    transition: 0.2s;
    vertical-align: middle;
}

.comment-menu-btn:active {
    transform: scale(0.92);
    color: var(--primary-color);
}

.delete-confirm-modal .modal-content {
    height: auto;
    max-height: 280px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.delete-confirm-modal.show .modal-content {
    transform: translateY(0);
}

.delete-confirm-content {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 0;
}

.delete-confirm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 12px 20px;
}

.delete-confirm-header i {
    font-size: 1.5rem;
    color: var(--delete-red);
    background: var(--bg-delete-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.delete-confirm-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.delete-confirm-body {
    padding: 20px;
    text-align: center;
}

.delete-confirm-body p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

.delete-confirm-actions {
    display: flex;
    gap: 12px;
    padding: 12px 20px 20px 20px;
}

.delete-confirm-cancel,
.delete-confirm-ok {
    flex: 1;
    padding: 12px 0;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.delete-confirm-cancel {
    background: #f5f5f5;
    color: var(--text-secondary);
}

.delete-confirm-cancel:active {
    transform: scale(0.97);
    background: #e8e8e8;
}

.delete-confirm-ok {
    background: var(--delete-red);
    color: var(--text-white);
}

.delete-confirm-ok:active {
    transform: scale(0.97);
    background: var(--delete-red-dark);
}

.datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    visibility: hidden;
    transition: 0.2s;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.datepicker-overlay.show {
    visibility: visible;
    background: var(--bg-overlay);
}

.datepicker-panel {
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 1.2rem 1.2rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.datepicker-overlay.show .datepicker-panel {
    transform: translateY(0);
}
/* 日历弹窗横线关闭区域 */
.datepicker-drag-bar {
    display: flex;
    justify-content: center;
    padding: 0 16px 16px;
    cursor: pointer;
}
.datepicker-drag-bar .drag-indicator {
    width: 3rem;
    height: 0.3rem;
    background: var(--border-light, #cbd5e1);
    border-radius: 4px;
    transition: background 0.2s;
}
.datepicker-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.2rem;
}

.datepicker-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.datepicker-close {
    background: var(--bg-datepicker-nav);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 30px;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: 0.1s;
}

.datepicker-close:active {
    background: var(--border-input);
    transform: scale(0.94);
}

.datepicker-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.nav-btn {
    background: var(--bg-datepicker-nav);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: 0.1s;
}

.nav-btn:active {
    background: var(--border-input);
    transform: scale(0.94);
}

.month-year {
    font-weight: 600;
    font-size: 1rem;
    background: var(--bg-datepicker-nav);
    padding: 6px 18px;
    border-radius: 40px;
    color: var(--text-heading);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary-text-light);
    margin-bottom: 0.5rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 1.5rem;
    min-height: 260px;
    overflow-y: auto;
}

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 40px;
    cursor: pointer;
    background: var(--bg-card);
    transition: 0.1s;
    color: var(--text-dark);
    min-width: 0;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: var(--text-white);
    font-weight: 600;
    box-shadow: var(--shadow-btn);
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
    background: var(--bg-body);
    font-weight: 500;
    color: var(--primary-color);
}

.calendar-day:active:not(.empty) {
    transform: scale(0.92);
    background: var(--primary-color);
    color: var(--text-white);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.datepicker-actions {
    display: flex;
    gap: 12px;
    margin-top: 0.5rem;
}

.datepicker-actions button {
    flex: 1;
    padding: 10px 0;
    border-radius: 60px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.1s;
    font-size: 0.85rem;
}

.datepicker-actions button:active {
    transform: scale(0.97);
}

.btn-today {
    background: var(--bg-datepicker-nav);
    color: var(--text-heading);
    border: 1px solid var(--border-input);
}

.btn-clear {
    background: var(--bg-tab-inactive);
    color: var(--text-secondary);
}

.btn-confirm {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-btn);
}

.filter-icon-btn {
    background: var(--bg-tab-inactive);
    width: 44px;
    height: 44px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-secondary);
    font-size: 1.3rem;
    border: none;
    position: relative;
}

.filter-icon-btn.active-filter {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-focus);
}

.filter-icon-btn.hide-in-dishes {
    display: none;
}

.swipe-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.swipe-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    will-change: transform;
}

.swipe-page {
    flex: 0 0 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
}

.dishes-layout {
    display: flex;
    height: 100%;
    width: 100%;
}

.dishes-sidebar {
    width: 95px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    overflow-y: auto;
    height: 100%;
}

.dishes-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
}

.empty-dishes-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    width: 100%;
}

.empty-dishes-wrapper .loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.app-layout,
.nav-sidebar,
.main-content {
    display: none;
}

.order-collapsed-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    flex-wrap: wrap;
}

.preview-dish-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--bg-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-card);
}

.preview-dish-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stats-badge-card {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--primary-color);
    margin-left: 4px;
    white-space: nowrap;
}

.stats-badge-card i {
    font-size: 1rem;
}

.expand-collapse-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    background: none;
}

.order-header .order-total.hide-total {
    display: none;
}

.order-items-list.collapsed-list {
    display: none;
}

.order-items-list.expanded-list {
    display: flex;
    flex-direction: column;
}

.dish-quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    margin-top: 4px;
    margin-left: auto;
    margin-right: 0;
    margin-bottom: 0;
    padding: 0;
}


.dish-quantity-control .dish-decr,
.dish-quantity-control .dish-incr {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-gray-light);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.dish-card .dish-info .add-cart-btn {
    margin-top: 4px;
    margin-left: auto;
    margin-right: 0;
    margin-bottom: 0;
}
.dish-quantity-control .dish-count {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.dish-card:first-child,
.review-card:first-child,
.order-summary-card:first-child {
    margin-top: 0.5rem;
}
/* 分类分隔标题 */
.category-divider {
    padding: 1rem 0.5rem;
}

.category-divider-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-body);
    display: inline-block;
    letter-spacing: 0.5px;
}

.category-divider:first-of-type {
    margin-top: 0;
}
/* 评论按钮样式 - 简洁版 */
.comment-order-btn {
    background: var(--primary-color);
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.comment-order-btn i {
    font-size: 0.85rem;
}

.comment-order-btn:active {
    transform: scale(0.94);
    opacity: 0.85;
}

/* 订单头部操作区域布局 */
.order-header {
    background: none;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    line-height: 1.2;
}

.order-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.order-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 删除订单按钮样式 */
.delete-order-btn {
    font-size: 0.75rem;
    color: #ff6b6b;
    background: #fff0f0;
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.delete-order-btn:active {
    transform: scale(0.94);
    background: #ffe0e0;
}
