/* Forecast Panel Styles */

#searchPanel.forecast-mode {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#searchPanel.forecast-mode .fp-wrap {
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

#searchPanel.forecast-mode .fp-header-back {
    display: flex;
    align-items: center;
    /*border-bottom: 1px solid #e0e0e0;*/
    /*padding: 10px;*/
    /*background: #f8f9fa;*/
    border-radius: 8px 8px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

#searchPanel.forecast-mode .fp-back-btn {
    cursor: pointer;
    margin-right: 10px;
    /*color: #1976d2;*/
    font-size: 18px;
}

#searchPanel.forecast-mode .fp-header-tabs {
    display: none; /* 隱藏原本的 tab */
}

#searchPanel.forecast-mode .fp-close {
    margin-left: auto;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
}

#searchPanel.forecast-mode .fp-close:hover {
    color: #333;
}

    #searchPanel.forecast-mode .fp-tab-content {
        display: none;
        padding: 0px 10px 12px 10px;
    }

#searchPanel.forecast-mode .fp-tab-content.active {
    display: block;
}

#searchPanel.forecast-mode .fp-main-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0;
}

#searchPanel.forecast-mode .fp-loc-group {
    flex: 1;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 2px 10px;
    position: relative;
    background: #fff;
}

#searchPanel.forecast-mode .fp-dotted-line {
    position: absolute;
    left: 21px;
    top: 36px;
    height: 18px;
    width: 0;
    border-left: 2px dotted #ff5252;
    z-index: 0;
}

#searchPanel.forecast-mode .fp-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    position: relative;
    z-index: 1;
}

#searchPanel.forecast-mode .fp-input-row:focus-within,
#searchPanel.forecast-mode .fp-input-row:has(.fp-search-results.show) {
    z-index: 10;
}

#searchPanel.forecast-mode .fp-divider {
    height: 1px;
    background: #efefef;
    margin: 0 0 0 32px;
}

#searchPanel.forecast-mode .fp-icon-col {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

#searchPanel.forecast-mode .fp-icon-dot {
    color: #3e8e56;
    font-size: 14px;
    border: 2px solid #3e8e56;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: block;
    box-sizing: border-box;
    z-index: 0;
}

#searchPanel.forecast-mode .fp-icon-pin {
    color: #e53935;
    font-size: 18px;
    z-index: 0;
}

#searchPanel.forecast-mode .fp-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    height: 100%;
    background: transparent;
}

#searchPanel.forecast-mode .fp-input::placeholder {
    color: #999;
}

#searchPanel.forecast-mode .fp-action-icon {
    color: #5f6368;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

#searchPanel.forecast-mode .fp-swap-btn {
    font-size: 16px;
    color: #333;
    cursor: pointer;
    padding: 0 4px;
}

#searchPanel.forecast-mode .fp-tools-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

#searchPanel.forecast-mode .fp-pill-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 36px;
    background: #f3f3f3;
    border-radius: 18px;
    color: #444;
    font-size: 14px;
    cursor: pointer;
    border: none;
    outline: none;
}

#searchPanel.forecast-mode .fp-time-select {
    flex: 1;
    justify-content: flex-start;
}

#searchPanel.forecast-mode .fp-add-btn {
    /* Button specific styles can be added here */
}

#searchPanel.forecast-mode .fp-time-inputs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow: hidden;
}

#searchPanel.forecast-mode .fp-input-pill {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
}

#searchPanel.forecast-mode .fp-input-val {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-align: center;
    background: transparent;
}

#searchPanel.forecast-mode .fp-clear-btn {
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
}

#searchPanel.forecast-mode .fp-input-val[type="time"],
#searchPanel.forecast-mode .fp-input-val[type="date"] {
    -webkit-appearance: none;
    cursor: pointer;
}

#searchPanel.forecast-mode .fp-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

#searchPanel.forecast-mode .fp-search-results.show {
    display: block;
}

#searchPanel.forecast-mode .fp-result-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

#searchPanel.forecast-mode .fp-result-item:hover {
    background: #f9f9f9;
}

#searchPanel.forecast-mode .fp-result-item:last-child {
    border-bottom: none;
}

#searchPanel.forecast-mode .fp-result-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

#searchPanel.forecast-mode .fp-result-address {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 目的地 tag 樣式（已選定狀態） */
#searchPanel.forecast-mode .fp-end-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 4px 12px;
    min-height: 36px;
    flex: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

#searchPanel.forecast-mode .fp-end-tag:hover {
    background: #bbdefb;
    border-color: #90caf9;
}

#searchPanel.forecast-mode .fp-tag-name {
    font-size: 15px;
    font-weight: 500;
    color: #0d47a1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

#searchPanel.forecast-mode .fp-tag-close {
    color: #1976d2;
    background: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#searchPanel.forecast-mode .fp-tag-close:hover {
    color: #fff;
    background: #1565c0;
}

/* Route Options Styles */
#searchPanel.forecast-mode .fp-result {
    margin-top: 16px;
}

#searchPanel.forecast-mode .fp-route-options {
    display: flex;
    flex-direction: column;
    /*gap: 8px;*/
    background: #f8f9fa;
    border-radius: 12px;
    padding: 6px;
    border: 1px solid #e0e0e0;
}

#searchPanel.forecast-mode .fp-route-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    cursor: pointer;
    transition: background 0.2s;
}

#searchPanel.forecast-mode .fp-route-card:hover {
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    margin: 0 -8px;
}

#searchPanel.forecast-mode .fp-route-icon {
    width: 36px;
    height: 36px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

#searchPanel.forecast-mode .fp-route-info {
    flex: 1;
    min-width: 0;
}

#searchPanel.forecast-mode .fp-route-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

#searchPanel.forecast-mode .fp-route-via {
    font-size: 12px;
    color: #666;
}

#searchPanel.forecast-mode .fp-route-co2 {
    font-size: 12px;
    color: #666;
}

#searchPanel.forecast-mode .fp-route-stats {
    text-align: right;
    flex-shrink: 0;
}

#searchPanel.forecast-mode .fp-route-time {
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 4px;
}

#searchPanel.forecast-mode .fp-route-dist {
    font-size: 12px;
    color: #666;
}

#searchPanel.forecast-mode .fp-route-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 4px 0;
}
