/* PC price trend popup */
.price-trend-modal-backdrop {
    display: none;
    position: fixed;
    z-index: 9998;
    inset: 0;
    background: rgba(20, 51, 96, 0.28);
    backdrop-filter: blur(1px);
}

.price-trend-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    width: min(1150px, calc(100vw - 64px));
    max-height: calc(100vh - 48px);
    padding: 18px 18px 16px;
    overflow: auto;
    transform: translate(-50%, -50%);
    border: 1px solid #cbdcf2;
    border-radius: 12px;
    background: #f8fbff;
    box-shadow: 0 18px 46px rgba(14, 42, 83, 0.28);
}

.price-trend-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 2px 12px;
    border-bottom: 1px solid #dce6f3;
}

.price-trend-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #123b82;
    font-size: 22px;
    font-weight: 700;
    line-height: 28px;
    cursor: pointer;
}

.price-trend-modal-expand {
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    color: #1d63ed;
}

.price-trend-modal-expand svg {
    width: 20px;
    height: 20px;
}

.price-trend-modal-close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #164582;
    background: transparent;
    font: 400 30px/30px Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.price-trend-modal-close:hover {
    color: #0d50b3;
    background: #e8f1ff;
}

.price-trend-modal-close:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.25);
    outline-offset: 1px;
}

.price-trend-modal-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 62px;
    padding: 10px 2px 11px;
}

.price-trend-modal-date-field {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #1b3769;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.price-trend-modal-date-field input {
    width: 192px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #c3d5ec;
    border-radius: 6px;
    outline: none;
    color: #1b3769;
    background: #ffffff;
    font: 15px Arial, sans-serif;
}

.price-trend-modal-date-field input:focus {
    border-color: #1d6ff2;
    box-shadow: 0 0 0 3px rgba(29, 111, 242, 0.12);
}

.price-trend-modal-search {
    width: 108px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: #0d6efd;
    font: 700 15px Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.price-trend-modal-search:hover {
    background: #095dcc;
    box-shadow: 0 5px 12px rgba(13, 110, 253, 0.22);
}

.price-trend-modal-search:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.25);
    outline-offset: 2px;
}

.price-trend-modal-chart-card {
    padding: 12px 14px 11px;
    border: 1px solid #dae6f4;
    border-radius: 10px;
    background: #ffffff;
}

.price-trend-modal-chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e3eaf3;
    color: #123b82;
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
}

.price-trend-modal-chart-title svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.price-trend-modal-chart-container {
    position: relative;
    width: 100%;
    height: 348px;
    margin-top: 4px;
}

#trendPopup #trendChart {
    width: 100% !important;
    height: 100% !important;
}

.price-trend-modal-chart-note {
    margin: 7px 0 0;
    color: #0756cf;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

@media screen and (max-width: 900px) {
    .price-trend-modal {
        width: calc(100vw - 28px);
        padding: 14px;
    }

    .price-trend-modal-title {
        font-size: 18px;
    }

    .price-trend-modal-filter {
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .price-trend-modal-date-field input {
        width: 170px;
    }

    .price-trend-modal-chart-container {
        height: 310px;
    }
}
