/* ======================================================
   pages/sxt_add.css — 道路安全添加页专属样式（摄像头 + 路况提醒）
   ====================================================== */

/* 移除导航栏预留空白 */
body { padding-top: 0 !important; }
.map-type-toggle { top: 16px !important; }

/* ============ 模式切换标签 ============ */
.add-mode-tabs {
    display: flex;
    gap: 0;
    margin-top: -4px;
    padding: 0 16px;
    border-bottom: 2px solid #e8e8e8;
}
.mode-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #888;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    text-align: center;
}
.mode-tab:hover { color: #c0392b; background: #fef5f5; }
.mode-tab.active {
    color: #c0392b;
    border-bottom-color: #c0392b;
    font-weight: 600;
}

/* ============ 路况提醒类型选择器（3列） ============ */
.alert-type-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}
.alert-type-btn {
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 12px;
}
.alert-type-btn:hover { border-color: #e67e22; }
.alert-type-btn.active { border-color: #e67e22; background: #fef9f3; }
.alert-type-btn .alert-type-icon { font-size: 26px; display: block; margin-bottom: 4px; }
.alert-type-btn .alert-type-label { font-weight: 500; color: #333; display: block; line-height: 1.2; }
.alert-type-btn.active .alert-type-label { color: #e67e22; }

/* 响应式 - 平板 */
@media (max-width: 768px) {
    .alert-type-selector { gap: 6px; }
    .alert-type-btn { padding: 10px 6px; font-size: 11px; border-radius: 8px; }
    .alert-type-btn .alert-type-icon { font-size: 22px; margin-bottom: 2px; }
    .alert-type-btn .alert-type-label { font-size: 10px; }
}

/* 响应式 - 手机 */
@media (max-width: 480px) {
    .add-mode-tabs { padding: 0 8px; }
    .mode-tab { padding: 8px 6px; font-size: 12px; }
    .alert-type-selector { gap: 4px; }
    .alert-type-btn { padding: 8px 4px; font-size: 10px; border-radius: 6px; }
    .alert-type-btn .alert-type-icon { font-size: 20px; margin-bottom: 2px; }
    .alert-type-btn .alert-type-label { font-size: 9px; line-height: 1.1; }
}

/* ======================================================
   附近红绿灯提示
   ====================================================== */
.nearby-camera-hint {
    background: linear-gradient(135deg, #eaf7ea 0%, #f0faf0 100%);
    border: 1px solid #a3d9a5;
    border-radius: 10px;
    padding: 12px;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}
.nearby-camera-hint::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #27ae60;
    border-radius: 4px 0 0 4px;
}
.nearby-hint-header {
    font-size: 13px;
    font-weight: 600;
    color: #1a7a3a;
    margin-bottom: 6px;
    padding-left: 8px;
}
.nearby-hint-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    margin-bottom: 6px;
}
.nearby-hint-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.nearby-hint-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #27ae60;
    color: #fff;
    font-weight: 500;
}
.nearby-hint-detail {
    font-size: 12px;
    color: #5a9a6a;
}
.nearby-hint-tip {
    font-size: 11px;
    color: #6a8a7a;
    padding-left: 8px;
    line-height: 1.5;
}

/* ======================================================
   响应式 — 平板 (768px)
   ====================================================== */
@media (max-width: 768px) {
    .nearby-camera-hint {
        padding: 10px;
        margin: 8px 0;
    }
    .nearby-hint-header { font-size: 12px; }
    .nearby-hint-name { font-size: 13px; }
    .nearby-hint-detail { font-size: 11px; }
}

/* ======================================================
   响应式 — 手机 (480px)
   ====================================================== */
@media (max-width: 480px) {
    .nearby-camera-hint {
        padding: 8px;
        margin: 6px 0;
    }
    .nearby-hint-header {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .nearby-hint-body {
        gap: 4px;
        margin-bottom: 4px;
    }
    .nearby-hint-name { font-size: 12px; }
    .nearby-hint-type {
        font-size: 10px;
        padding: 1px 6px;
    }
    .nearby-hint-detail { font-size: 10px; }
    .nearby-hint-tip { font-size: 10px; }
}

/* ======================================================
   时效天数选择器
   ====================================================== */
.duration-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.duration-btn {
    flex: 1;
    min-width: 50px;
    padding: 8px 6px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    text-align: center;
}
.duration-btn:hover {
    border-color: #e67e22;
    color: #e67e22;
}
.duration-btn.active {
    border-color: #e67e22;
    background: #fef9f3;
    color: #e67e22;
    font-weight: 600;
}
.custom-input-btn {
    font-size: 12px !important;
}
.custom-duration-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 6px 8px;
    background: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}
.custom-duration-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    outline: none;
}
.custom-duration-input:focus {
    border-color: #e67e22;
}
.custom-duration-hint {
    font-size: 12px;
    color: #999;
}

/* 时效选择器 — 平板 */
@media (max-width: 768px) {
    .duration-btn {
        min-width: 45px;
        padding: 6px 4px;
        font-size: 12px;
    }
}

/* 时效选择器 — 手机 */
@media (max-width: 480px) {
    .duration-selector {
        gap: 4px;
    }
    .duration-btn {
        min-width: 40px;
        padding: 5px 3px;
        font-size: 11px;
        border-radius: 6px;
    }
    .custom-input-btn {
        font-size: 10px !important;
    }
    .custom-duration-wrapper {
        padding: 4px 6px;
    }
    .custom-duration-input {
        width: 70px;
        font-size: 12px;
    }
}
