/* 菜篮页面样式 */

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.basket-header h1 {
    margin: 0;
}

.basket-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background-color: #ff9d00;
    color: white;
}

.action-btn:hover {
    background-color: #e88e00;
}

/* 清空菜篮按钮样式 */
.btn-clear-basket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    min-width: 120px;
}

.btn-clear-basket i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-clear-basket:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-clear-basket:hover i {
    transform: translateY(-2px) scale(1.1);
}

.btn-clear-basket:active {
    transform: translateY(0);
}

.btn-clear-basket:disabled {
    background: linear-gradient(135deg, #ccc, #bbb);
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.basket-items {
    margin-top: 20px;
}

.basket-category {
    margin-bottom: 24px;
}

.category-title {
    font-size: 20px;
    color: #ff9d00;
    border-bottom: 2px solid #ff9d00;
}

.basket-item-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.basket-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 6;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.item-name {
    flex: 1;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.item-status-buttons {
    display: flex;
    gap: 8px;
}

.status-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.status-btn.active {
    color: white;
    font-weight: 600;
}

.status-have {
    background-color: #f0f0f0;
    color: #666;
}

.status-have.active {
    background-color: #28a745;
}

.status-need {
    background-color: #f0f0f0;
    color: #666;
}

.status-need.active {
    background-color: #ffc107;
    color: #212529;
}

.status-none {
    background-color: #f0f0f0;
    color: #666;
}

.status-none.active {
    background-color: #dc3545;
}

.shopping-list-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.shopping-list-actions button {
    padding: 12px 36px;
    font-size: 18px;
    min-width: 200px;
}

/* 查看采购清单按钮样式 */
#generate-shopping-list-btn {
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

#generate-shopping-list-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004494);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#generate-shopping-list-btn:active {
    transform: translateY(0);
}

/* 采购完成按钮样式 */
.modal-footer .btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    padding: 12px 36px;
    font-size: 16px;
}

.modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.modal-footer .btn-success:active {
    transform: translateY(0);
}

/* 关闭清单按钮样式 */
.modal-footer .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    padding: 12px 36px;
    font-size: 16px;
}

.modal-footer .btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.modal-footer .btn-danger:active {
    transform: translateY(0);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.close-btn {
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
}

.shopping-list-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.shopping-list-item:last-child {
    border-bottom: none;
}

/* 采购清单复选框样式 */
.shopping-list-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ff9d00;
    border:3px solid #ff9d00 ;
    flex-shrink: 0;
}

/* 采购清单文本样式 */
.shopping-list-text {
    flex: 1;
    transition: color 0.3s;
}

/* 已选中状态 */
.shopping-list-item.completed .shopping-list-text {
    text-decoration: line-through;
    color: #999;
}
