/* Personel detay / analitik grafik panelleri — tam ekran genişletme */
.kku-chart-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.kku-chart-panel-head .personel-yazar-grafikleri-panel-title {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.kku-chart-panel-maximize-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(0, 51, 102, 0.16);
    border-radius: 8px;
    background: #f8fafc;
    color: #003366;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.kku-chart-panel-maximize-btn:hover {
    background: #eef4ff;
    border-color: rgba(0, 51, 102, 0.32);
    color: #001a33;
}

.kku-chart-panel-maximize-btn:focus-visible {
    outline: 2px solid rgba(0, 51, 102, 0.45);
    outline-offset: 2px;
}

.kku-chart-panel-maximize-btn--float {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.yillik-yayin-toolbar-view {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.kku-chart-widget-maximize-wrap--toolbar {
    position: static;
}

.yillik-yayin-header-row:has(.kku-chart-widget-maximize-wrap--header) {
    position: relative;
    padding-right: 2.75rem;
}

.kku-chart-widget-maximize-wrap--header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
}

/* Ortak yazar ağı vb. — maximize, .trend-header sağında (başlık satırı) */
.kku-chart-widget-maximize-wrap--trend-header {
    flex-shrink: 0;
    margin-left: auto;
    align-self: flex-start;
    padding-top: 0.15rem;
}

.trend-header:has(> .kku-chart-widget-maximize-wrap--trend-header) {
    align-items: flex-start;
}

.kampus-ortak-yazar-section.kku-chart-widget-maximize-root,
.yayin-ortak-yazar-section.kku-chart-widget-maximize-root {
    overflow: visible;
}

.kku-chart-widget-maximize-root .chart-panel-with-empty > .kku-chart-panel-maximize-btn--float {
    display: none !important;
}

.kku-chart-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.kku-chart-panel-backdrop[hidden] {
    display: none !important;
}

.kku-chart-panel--maximized {
    position: fixed !important;
    inset: 0.75rem !important;
    z-index: 10060 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 1rem 1.1rem 0.85rem !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 51, 102, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden !important;
}

.kku-chart-panel--maximized.kku-chart-widget-maximize-root {
    overflow: auto !important;
}

.kku-chart-panel--maximized .kku-chart-panel-head,
.kku-chart-panel--maximized .personel-yazar-grafikleri-network-hint,
.kku-chart-panel--maximized .pyg-network-toolbar,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root > .trend-header,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-header-row,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .kku-chart-widget-maximize-wrap,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-toolbar-view {
    flex-shrink: 0;
}

.kku-chart-panel--maximized.kku-chart-widget-maximize-root .trend-yayin-panels,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-chart-panel,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .trend-chart-container.chart-panel-with-empty,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root > .chart-panel-with-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.kku-chart-panel--maximized.kku-chart-widget-maximize-root .trend-yayin-panels {
    display: flex;
    flex-direction: column;
}

.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-sayilari-table-block:not(.yillik-yayin-sayilari-panel--hidden):not(.trend-yayin-panel--hidden),
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-endeks-table-block:not(.yillik-yayin-endeks-panel--hidden) {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-sayilari-table-scroll,
.kku-chart-panel--maximized.kku-chart-widget-maximize-root .yillik-yayin-endeks-table-scroll {
    max-height: none;
}

.kku-chart-panel--maximized .personel-yazar-grafikleri-chart,
.kku-chart-panel--maximized .chart-panel-with-empty__plot {
    flex: 1 1 auto;
    width: 100% !important;
    height: auto !important;
    min-height: min(72vh, 720px) !important;
}

.kku-chart-panel--maximized.chart-panel-with-empty--show-empty .chart-panel-with-empty__empty,
.kku-chart-panel--maximized .chart-panel-with-empty__empty.is-visible {
    flex: 1 1 auto;
    min-height: min(60vh, 520px) !important;
}

body.kku-chart-panel-maximized-open {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .kku-chart-panel--maximized {
        inset: 0.35rem !important;
        padding: 0.75rem 0.8rem 0.65rem !important;
    }

    .kku-chart-panel--maximized .personel-yazar-grafikleri-chart,
    .kku-chart-panel--maximized .chart-panel-with-empty__plot {
        min-height: min(68vh, 640px) !important;
    }
}

html[data-color-mode="dark"] .kku-chart-panel-maximize-btn {
    background: var(--kku-cm-surface-3, #1e293b) !important;
    border-color: var(--kku-cm-border, #334155) !important;
    color: var(--kku-cm-text, #e8edf5) !important;
}

html[data-color-mode="dark"] .kku-chart-panel-maximize-btn:hover {
    background: var(--kku-cm-surface-2, #243047) !important;
    border-color: rgba(148, 163, 184, 0.45) !important;
    color: #fff !important;
}

/* Maximize panel body'ye taşındığında .personel-detail-page dışında kalır — doğrudan hedefle */
html[data-color-mode="dark"] .kku-chart-panel--maximized {
    background: var(--kku-cm-surface, #141c2e) !important;
    border-color: var(--kku-cm-border, #334155) !important;
    color: var(--kku-cm-text, #e8edf5) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .personel-yazar-grafikleri-panel-title {
    color: var(--kku-cm-text, #e8edf5) !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .personel-yazar-grafikleri-panel-title i {
    color: #93c5fd !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .personel-yazar-grafikleri-network-hint,
html[data-color-mode="dark"] .kku-chart-panel--maximized .pyg-network-search__label-hint {
    color: var(--kku-cm-text-muted, #94a3b8) !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .pyg-network-search {
    border-color: var(--kku-cm-border, #334155) !important;
    background: linear-gradient(145deg, rgba(26, 36, 56, 0.98) 0%, rgba(15, 23, 42, 0.96) 100%) !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .pyg-network-filter-combobox .pyg-network-filter-input {
    background: var(--kku-cm-surface-2, #1e293b) !important;
    border-color: var(--kku-cm-border, #334155) !important;
    color: var(--kku-cm-text, #e8edf5) !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .pyg-network-filter-combobox .pyg-network-filter-input::placeholder {
    color: var(--kku-cm-text-muted, #94a3b8) !important;
    opacity: 0.85;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .pyg-network-filter-combobox .pyg-network-filter-input:focus {
    border-color: rgba(55, 200, 154, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(55, 200, 154, 0.16) !important;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .personel-yazar-grafikleri-chart,
html[data-color-mode="dark"] .kku-chart-panel--maximized .chart-panel-with-empty__plot {
    background: var(--kku-cm-chart-bg, #1a2438) !important;
    border-radius: 10px;
}

html[data-color-mode="dark"] .kku-chart-panel--maximized .chart-panel-with-empty__empty,
html[data-color-mode="dark"] .kku-chart-panel--maximized .anasayfa-chart-empty {
    background: var(--kku-cm-chart-bg, #1a2438) !important;
    color: var(--kku-cm-text-muted, #94a3b8) !important;
}

html[data-color-mode="dark"] .personel-detail-page .kku-chart-panel--maximized {
    background: var(--kku-cm-surface, #141c2e) !important;
    border-color: var(--kku-cm-border, #334155) !important;
}
