/* Price Chart Modal - Based on Share Modal Style */
.price-chart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 60%);
    z-index: 9999;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.price-chart-modal.show {
    display: block;
    opacity: 1;
}

body.modal-open {
    overflow: hidden;
}

.price-chart-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: inherit !important;
}

.price-chart-modal-close {
    background: #e8e8e8 !important;
    border-radius: 8px;
    line-height: 1;
    color: #1c1c1c;
    border: none;
    font-size: 24px;
    float: left;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s ease;
    z-index: 99;
    position: relative;
}

.price-chart-modal-close:hover,
.price-chart-modal-close:focus {
    background: #d0d0d0 !important;
}

.price-chart-modal-body {
    padding: 10px 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    margin: 0 0 10px 0;
    font-size: 22px !important;
    font-weight: 700;
    color: #333 !important;
    font-family: inherit !important;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px !important;
    color: #666 !important;
    font-weight: 300 !important;
    font-family: inherit !important;
}

/* Loader */
.modal-loader {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--e-global-color-primary, #EF394F);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.chart-container canvas {
    font-family: inherit !important;
}

/* Tabs */
.tabs-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-button {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit !important;
    font-size: 14px;
    color: #1c1c1c;
}

.tab-button:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.tab-button.active {
    background: var(--e-global-color-primary, #EF394F);
    color: #fff;
    border-color: var(--e-global-color-primary, #EF394F);
}

.tab-content {
    display: none;
}

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

/* No Data Message */
.no-data-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
    font-family: inherit !important;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Latest Change Date */
.latest-change-date {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-family: inherit !important;
}

/* Icon Button */
.price-chart-icon-container {
    display: inline-block;
}

.price-chart-icon-button {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.price-chart-icon-button:hover {
    transform: scale(1.1);
    color: #d32f3f;
}

.price-chart-icon-button svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .price-chart-modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 15px;
    }
    
    .chart-container {
        height: 300px;
        padding: 10px;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 250px;
    }
    
    .price-chart-modal-content {
        padding: 12px;
    }
}
