/**
 * pages/oil.css — 유가정보 페이지 전용 스타일
 */

.oil-grid-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 15px;
}

.oil-grid-item {
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 4px;
    min-width: 0;
}

.grid-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding: 20px 0;
}

.grid-label {
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 17px;
    color: #333;
    font-weight: 500;
    text-align: center;
    background: #fff;
}

.grid-value {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}

.grid-station {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
}

/* Active Price Color - Dashboard Blue */
.is-cheapest {
    color: #574541 !important;
}

.is-expensive {
    color: #fb7185 !important;
}

/* Advice Area */
.card-advice {
    background: #fcf8f6;
    padding: 12px 15px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advice-badge {
    background: #8c5e3c;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.advice-text {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    font-weight: 500;
}

/* Tab Styles */
.oil-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    margin: 15px;
    border: 1px solid #fafafa;
}

.oil-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #574541;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.oil-tab.active {
    background: #574541;
    color: #fff;
}

.oil-content {
    display: none;
}

.oil-content.active {
    display: block;
}

/* Station Table List (Dashboard Weekly Style) */
.station-table-list {
    margin-top: 10px;
    padding: 0 0 15px;
}

.st-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s;
}

.st-row:not(.st-header):hover {
    background-color: #f8fafc;
}

.st-row.st-header {
    border-bottom: 2px solid #f1f5f9;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    background: #fff !important;
    cursor: default;
}

.st-row:nth-child(even) {
    background-color: #fcfcfc;
}

.col-st-info {
    flex: 0 0 40%;
    width: 40%;
    text-align: left;
    overflow: hidden;
    font-size: 17px;
    color: #475569;
}

.col-st-price {
    flex: 0 0 20%;
    width: 20%;
    text-align: center;
    font-size: 17px;
    font-weight: 800;
    color: #475569;
}

.st-name {
    font-size: 17px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.st-brand {
    font-size: 15px;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-price-val {
    display: block;
}

.st-price-val.is-cheapest {
    color: #35a7f6 !important;
    font-weight: 800;
}

/* Oil Insights Section (Deep Analysis) */
.oil-insights-section {
    padding: 0 15px;
    margin-bottom: 20px;
}

.insight-card-v2 {
    padding: 20px !important;
    border-radius: 16px !important;
    margin-bottom: 15px !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid #f0f1f5 !important;
    overflow: hidden;
}

.insight-card-v2.no-bezel {
    border: none !important;
    box-shadow: none !important;
    padding: 20px 0 !important;
}

.trend-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.header-divider-v2 {
    height: 1px;
    background: #f0f0f0;
    width: 100%;
    margin: 0;
}

.summary-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 1;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    box-sizing: border-box;
    /* 패딩/테두리 포함 계산 */
}

.summary-item.active {
    border: 2px solid var(--brown);
    box-shadow: 0 4px 15px rgba(87, 69, 65, 0.15);
    transform: translateY(-2px);
    opacity: 1 !important;
}

.summary-item .label {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 2px;
}

.summary-item .val {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    display: block;
}

.summary-item.oil-grid-item {
    padding: 0 !important;
    cursor: pointer;
    height: auto;
    min-height: 140px;
}

.diff-summary-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
}

.diff-row-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px dashed #f0f0f0;
    padding: 2px 0;
}

.diff-row-mini:last-child {
    border-bottom: none;
}

.diff-row-mini .d-lbl {
    font-size: 17px;
    color: #999;
    font-weight: 500;
}

.diff-row-mini .d-v {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.diff-row-mini .up {
    color: #f46363;
}

.diff-row-mini .down {
    color: #35a7f6;
}

.diff-row-mini .same {
    color: #94a3b8;
}

.diff-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 12px !important;
    background: #fbfbfc;
    width: 100%;
    box-sizing: border-box;
}

.diff-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.diff-row .d-lbl {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.diff-row .d-v {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.diff-row .up {
    color: #e11d48;
}

.diff-row .down {
    color: #2563eb;
}

.diff-row .same {
    color: #94a3b8;
}

.oil-chart-container {
    animation: oilFadeIn 0.4s ease;
}

@keyframes oilFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-avg-table {
    width: 100%;
    border-collapse: collapse;
}

.brand-avg-table th {
    text-align: left;
    font-size: 17px;
    color: #475569;
    padding: 10px 5px;
    border-bottom: 1px solid #f0f1f5;
}

.brand-avg-table td {
    padding: 12px 5px;
    font-size: 17px;
    border-bottom: 1px solid #f9f9f9;
}

.brand-avg-table .b-name {
    font-weight: 700;
    color: #3d2b1f;
    font-size: 17px;
}

.brand-avg-table .highlight {
    color: #3d2b1f;
    font-weight: 500;
    background: #fdfaf8;
}

@media (max-width: 440px) {
    .diff-row {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .diff-row .d-lbl {
        transform: scale(0.8);
    }

    .summary-item .val {
        font-size: 14px;
    }
}

/* --- Map Modal Styles --- */
.map-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    flex-direction: column;
}

.map-modal-container {
    position: fixed;
    inset: 0;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f1f5;
    flex-shrink: 0;
    background: #fff;
}

.map-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #3d2b1f;
}

.map-modal-header .q-brand {
    color: #d2b48c;
    margin-right: 5px;
}

.map-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}

/* Address Bar (Circled by user) */
.map-modal-address-bar {
    padding: 10px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 17px;
    color: #666;
}

.map-modal-address-bar i {
    color: #d2b48c;
    margin-right: 6px;
}

.kakao-map-container {
    flex: 1;
    width: 100%;
}

.map-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
}

.map-loading-overlay .loading-content {
    text-align: center;
}

.map-loading-overlay i {
    font-size: 28px;
    color: #d2b48c;
}

.map-loading-overlay .loading-text {
    margin-top: 10px;
    font-size: 14px;
    color: #888;
}