/* TTFT Chart Styling */

/* Two-section header layout */
.param-class-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.header-section {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.header-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.header-section-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.header-section-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-section-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
}

.header-section-value {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

/* TTFT Chart Container in Header */
.ttft-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ttft-chart-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.ttft-chart-thumbnail {
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.ttft-chart-thumbnail:hover {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
}

.ttft-chart-thumbnail-svg {
    display: block;
}

.ttft-chart-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* TTFT Modal */
.ttft-chart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ttft-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.ttft-modal-content {
    position: relative;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 950px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

.ttft-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.ttft-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.ttft-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ttft-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ttft-modal-body {
    padding: 1.5rem;
    position: relative;
}

.ttft-chart-full {
    display: block;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
}

.ttft-curve {
    cursor: crosshair;
    transition: stroke-width 0.2s ease;
}

.ttft-curve:hover {
    stroke-width: 4;
}

.ttft-chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.legend-item span {
    display: block;
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.ttft-hover-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #fff;
    pointer-events: none;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-sections {
        grid-template-columns: 1fr;
    }

    .ttft-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .ttft-chart-full {
        max-width: 100%;
        height: auto;
    }
}