/* 搜索表单样式 */
.fodmap-search-form {
margin: 20px auto; /* 上下20px，左右自动（居中） */
display: flex;
max-width: 1960px; /* 最大宽度 */
width: 100%; /* 确保在小于600px的容器中正常缩小 */
}

.fodmap-search-form input[type="text"] {
    flex: 1; /* 占据剩余空间 */
    padding: 12px 16px; /* 与之前提供的输入框内边距一致 */
    font-size: 16px;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px; /* 左上和左下圆角，右上和右下直角（因为按钮有圆角） */
    background-color: #f9fafb;
    color: #1f2937;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 输入框悬停效果 */
.fodmap-search-form input[type="text"]:hover {
    border-color: #9ca3af;
    background-color: #fff;
}

/* 输入框聚焦效果 */
.fodmap-search-form input[type="text"]:focus {
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* 按钮样式 */
.fodmap-search-form button {
    padding: 12px 24px; /* 与输入框内边距协调（垂直相同，水平略大） */
    background: #3b82f6; /* 使用输入框聚焦色作为按钮背景 */
    color: white;
    border: none;
    border-radius: 0 8px 8px 0; /* 右上和右下圆角，左上和左下直角 */
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* 为了和输入框高度一致，可以设置相同的高度或者由内边距控制，这里内边距已经一致 */
}

/* 按钮悬停效果 */
.fodmap-search-form button:hover {
    background: #2563eb; /* 深一点的蓝色 */
}

/* 按钮点击效果 */
.fodmap-search-form button:active {
    transform: scale(0.98); /* 轻微缩小效果 */
}

/* 按钮聚焦效果 */
.fodmap-search-form button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); /* 与输入框聚焦阴影一致 */
}

/* 搜索结果样式 */
.fodmap-search-results li {
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.fodmap-level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.level-low { background-color: #4CAF50; }
.level-medium { background-color: #FFC107; color: #333; }
.level-high { background-color: #F44336; }

.fodmap-category {
    font-style: italic;
    color: #666;
    margin-bottom: 5px;
}

.fodmap-description {
    line-height: 1.6;
}

.fodmap-results {
    margin-top: 30px;
}

.fodmap-food {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #fafafa;
}

.food-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.fodmap-level {
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
    font-weight: normal;
    font-size: 12px;
    text-transform: uppercase;
}

.food-desc {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}
/* ====== 小工具特定样式 ====== */

.fodmap-widget-container {
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget-search-box {
    display: flex;
    margin-bottom: 15px;
}

.widget-search-box input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.widget-search-button {
    padding: 10px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

.fodmap-widget-results {
    max-height: 300px;
    overflow-y: auto;
}

.widget-food-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.widget-food-item:last-child {
    border-bottom: none;
}

.widget-food-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
}

.widget-fodmap-level {
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.widget-food-desc {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.4;
}

.widget-no-results {
    padding: 10px 0;
    text-align: center;
    color: #888;
    font-style: italic;
    font-size: 13px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .fodmap-widget-container {
        padding: 10px;
    }
    
    .widget-food-name {
        font-size: 13px;
    }
    
    .widget-fodmap-level {
        padding: 1px 6px;
        font-size: 10px;
    }
}