/* RateScout - Mobile-first styles */

:root {
    --primary: #0066F6;
    --up: #FF4D4F;
    --down: #52C41A;
    --flat: #999;
}

body { padding-bottom: 4rem; }

.muted { color: #888; }

/* ── 底部导航 ── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; background: #fff; border-top: 1px solid #e5e5e5;
    z-index: 100; padding: 0.4rem 0 env(safe-area-inset-bottom, 0.3rem);
}
.bottom-nav a {
    flex: 1; text-align: center; text-decoration: none;
    color: #666; font-size: 0.75rem; padding: 0.3rem 0;
    display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav .icon { font-size: 1.2rem; }

/* ── 日期快选 ── */
.day-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.day-tabs a {
    padding: 0.3rem 0.8rem; border-radius: 1rem; font-size: 0.85rem;
    text-decoration: none; color: #666; background: #f5f5f5;
}
.day-tabs a.active { background: var(--primary); color: #fff; }

/* ── 酒店卡片 ── */
.hotel-grid { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
@media (min-width: 600px) { .hotel-grid { grid-template-columns: 1fr 1fr; } }

.hotel-card {
    padding: 1rem; border-radius: 0.8rem; background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); cursor: pointer;
    transition: box-shadow 0.2s;
}
.hotel-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.hotel-name { font-size: 0.9rem; color: #333; margin-bottom: 0.3rem; }
.hotel-price { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.hotel-price .currency { font-size: 1rem; }
.hotel-price small { font-size: 0.8rem; color: #999; font-weight: 400; }

.badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 1rem; margin-left: 0.5rem; }
.badge.up { background: #FFF1F0; color: var(--up); }
.badge.down { background: #F6FFED; color: var(--down); }
.badge.flat { background: #f5f5f5; color: var(--flat); }

/* ── 返回链接 ── */
.back-link { font-size: 0.85rem; text-decoration: none; color: var(--primary); }

/* ── 日历网格 ── */
.calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-cell {
    padding: 0.4rem 0.2rem; border-radius: 0.4rem; text-align: center;
    cursor: pointer; font-size: 0.75rem; line-height: 1.3;
    display: flex; flex-direction: column; align-items: center;
}
.cal-cell.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.cal-day { font-weight: 600; }
.cal-wd { color: #666; font-size: 0.65rem; }
.cal-price { font-weight: 600; font-size: 0.7rem; }

/* ── 对比表格 ── */
.current-hotel { background: #F0F5FF; }
.lowest { color: var(--down); font-weight: 600; }

/* ── 对比页控件 ── */
.compare-controls {
    display: flex; gap: 0.5rem; align-items: end; flex-wrap: wrap;
}
.compare-controls label { font-size: 0.8rem; }
.compare-controls input[type="date"] { font-size: 0.85rem; padding: 0.3rem; }
.compare-controls button { font-size: 0.85rem; padding: 0.3rem 0.8rem; }

/* ── 设置页 ── */
.hotel-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 1rem; margin-bottom: 0.5rem;
    background: #fff; border-radius: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.hotel-item-info { display: flex; flex-direction: column; gap: 0.15rem; }
.hotel-item-name { font-weight: 500; }
.hotel-item-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.btn-move { padding: 0.2rem 0.4rem; font-size: 0.85rem; min-width: 0; }
.btn-move:disabled { opacity: 0.3; cursor: default; }
.btn-sm { font-size: 0.75rem; padding: 0.25rem 0.6rem; margin: 0; }
.btn-danger { color: var(--up); border-color: var(--up); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
