#priceHistoryModal .modal-container {
    background: #ffffff;
    max-width: 800px;
    padding: 30px;
    width: 100%;
}

#priceHistoryModal .modal-close {
    background: transparent;
    font-size: 24px;
}


.price-history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease;
}

.price-history-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Modal content */
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
            0 25px 50px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: slideUp 0.4s ease;
    position: relative;
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    letter-spacing: -0.5px;
}

.close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #95a5a6;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background: #f8f9fa;
    color: #2c3e50;
    transform: scale(1.1);
}

/* Price type tabs */
.price-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.price-tab {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.price-tab.active {
    background: #17365C;
    color: white;
    border-color: #17365C;
}

.price-stats {
    display: flex;
    margin-bottom: 16px;
}


.stat-label {
    font-size: 12px;
    margin-bottom: 2px;
    font-weight: 400;
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}

.promotion-banner {
    background: #dbe8d9;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.chart-container {
    position: relative;
    height: 450px;
    margin-bottom: 32px;
    background: #ffffff;
    border-radius: 12px;
}

.apartment-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* Price list */
.price-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: white;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.price-item:last-child {
    border-bottom: none;
}

.price-item:hover {
    background: #fafbfc;
}

.price-date {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.price-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

.promotion-price {
    font-size: 14px;
    font-weight: 600;
    background: #fff5f5;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #fed7d7;
}

.price-change {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.price-change.up {
    background: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

.price-change.down {
    background: #c6f6d5;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.price-change.same {
    background: #f7fafc;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.loading {
    text-align: center;
    padding: 60px 40px;
    color: #6c757d;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #c49182;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.price-history-button {
    display: inline-flex;
    align-items: center;
    background: transparent;
    padding: 14px 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.button-icon {
    font-size: 16px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom scrollbar for price list */
.price-list::-webkit-scrollbar {
    width: 6px;
}

.price-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.price-list::-webkit-scrollbar-thumb {
    background: #c49182;
    border-radius: 3px;
}

.price-list::-webkit-scrollbar-thumb:hover {
    background: #b08570;
}

/* Responsive design */
@media (max-width: 768px) {
    .price-history-modal {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        padding: 20px;
        border-radius: 12px;
        max-height: 95vh;
    }

    .modal-title {
        font-size: 24px;
    }

    .price-stats {
        display: flex;
    }

    .price-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .price-tab {
        padding: 8px 20px;
        font-size: 12px;
    }

    .chart-container {
        height: 300px;
    }

    .stat-value {
        font-size: 18px;
    }

    .price-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px;
    }

    .price-item > div:last-child {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 16px;
    }

    .modal-header {
        margin-bottom: 24px;
    }

    .modal-title {
        font-size: 20px;
    }

    .price-stats {
        display: flex;
    }

    .stat-box {
        padding: 16px;
    }

    .chart-container {
        height: 250px;
        padding: 12px;
    }

    .price-history-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modal-content {
        border: 2px solid #000;
    }

    .price-tab {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .price-history-modal,
    .modal-content,
    .price-tab,
    .stat-box,
    .price-history-button {
        animation: none;
        transition: none;
    }

    .spinner {
        animation: none;
        border: 4px solid #c49182;
        border-top: 4px solid #f3f4f6;
    }
}

/* Print styles */
@media print {
    .price-history-modal {
        display: none !important;
    }
}

/* Focus styles for accessibility */
.price-tab:focus,
.close-button:focus,
.price-history-button:focus {
    outline: 3px solid #c49182;
    outline-offset: 2px;
}

/* Dark mode support (if your theme supports it) */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #1a1a1a;
        color: #ffffff;
        border: 1px solid #333;
    }

    .modal-title {
        color: #ffffff;
    }

    .close-button {
        color: #cccccc;
    }

    .close-button:hover {
        background: #333;
        color: #ffffff;
    }

    .stat-label {
        color: #595858;
    }

    .stat-value {
        color: #141212;
    }

    .price-list {
        background: #2a2a2a;
        border-color: #444;
    }

    .price-item {
        border-color: #333;
    }

    .price-item:hover {
        background: #333;
    }

    .price-value {
        color: #ffffff;
    }

    .price-date {
        color: #cccccc;
    }

    .apartment-info {
        background: #2a2a2a;
        border-color: #444;
        color: #cccccc;
    }
}





.price-values {
    position: relative;
    width: 100%;
}


.info-icon {
    color: #999;
    cursor: pointer;
    font-size: 16px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
}

.info-icon:hover {
    background: #f5f5f5;
    border-color: #B8860B;
    color: #B8860B;
}

.price-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.price-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}

.price-tooltip.hidden {
    display: none;
}

.tooltip-content {
    background: #F8F8F6;
    color: #101010;
    font-weight: 400;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid #E9E9E2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
}


.tooltip-content small {
    opacity: 0.8;
    font-size: 11px;
}

/* Responsive tooltip positioning */
@media (max-width: 768px) {
    .price-tooltip {
        position: absolute;
        bottom: auto;
        top: 50%;
        transform: translate(-50%, 0%);
        margin: 0;
        right: 0;
        min-width: 160px;
    }

    .tooltip-content {
        white-space: normal;
        max-width: 300px;
    }
}


.price-label {
    font-size: 16px;
}

.price-current {
    font-size: 25px;
    font-weight: 700;
}

.price-original {
    font-size: 17px;
    font-weight: 500;
    text-decoration: line-through;
    opacity: 0.5;
}

.price-display {
    max-width: 500px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}


.investment__data .h5 {
    line-height: 1.5;
}
