/* ═══════════════ sonuç paneli yerleşimi: bir bakışta, gruplar, genişlet (features/panel-layout.js) ═══════════════ */

/* başlık kartı: üst satırda tür etiketi + Genişlet */
.rs-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.rs-wide { gap: 5px; font-weight: 700; color: var(--text-2); }
.rs-wide:hover { color: var(--text); }

.rs-top { display: flex; flex-direction: column; gap: var(--space-3); }
.rs-top__side { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.rs-top__side:empty { display: none; }

/* kime göre */
.rs-persona { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rs-persona__k { font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); margin-right: 2px; }
.rs-persona .chip { cursor: pointer; }

/* bir bakışta */
.gl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gl-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0;
  padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gl-tile:hover { border-color: var(--line-2); }
.gl-tile:active { transform: scale(.98); }
.gl-tile:focus-visible { outline: none; box-shadow: var(--focus); }
.gl-tile__k { font-size: 11px; font-weight: 700; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gl-tile__v { font-size: var(--fs-sm); font-weight: 800; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; }
.gl-tile__s { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gl-tile[data-tone="ok"] { background: var(--success-soft); border-color: transparent; }
.gl-tile[data-tone="ok"] .gl-tile__v { color: var(--success); }
.gl-tile[data-tone="dikkat"] { background: var(--warning-soft); border-color: transparent; }
.gl-tile[data-tone="dikkat"] .gl-tile__v { color: var(--warning); }
.gl-tile[data-tone="bilgi"] { background: var(--surface-2); border-color: transparent; }
.gl-tile[data-tone="yok"] .gl-tile__v { color: var(--text-3); font-weight: 700; }

/* gruplar */
.rs-groups { display: flex; flex-direction: column; gap: var(--space-3); }
.rs-group__head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 800; font-size: var(--fs-sm);
  cursor: pointer; text-align: left;
}
.rs-group__head:hover { border-color: var(--line-2); }
.rs-group__head:focus-visible { outline: none; box-shadow: var(--focus); }
.rs-group__icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-text); flex: none; }
.rs-group__title { flex: 1; min-width: 0; }
.rs-group__warn { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--warning-soft); color: var(--warning); white-space: nowrap; }
.rs-group__chev { display: inline-flex; color: var(--text-3); transition: transform var(--dur) var(--ease); }
.rs-group.is-open .rs-group__chev { transform: rotate(180deg); }
.rs-group__peek { font-size: var(--fs-xs); color: var(--text-3); padding: 5px 12px 0 46px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-group.is-open .rs-group__peek { display: none; }
.rs-group__body { display: none; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); }
.rs-group.is-open .rs-group__body { display: flex; }
.rs-slot { min-width: 0; scroll-margin-top: 12px; }
.rs-slot > .notice + .card { margin-top: var(--space-3); }
.rs-slot.is-flash > .card, .rs-slot.is-flash > .lead-cta { animation: rs-flash 1.4s var(--ease); }
@keyframes rs-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow-xs); } }

/* işlemler: ana düğmeler + "Diğer" menüsü */
.rs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rs-more { position: relative; }
.rs-more > summary { list-style: none; cursor: pointer; }
.rs-more > summary::-webkit-details-marker { display: none; }
.rs-more[open] > summary { border-color: var(--line-2); background: var(--surface-2); }
.rs-more__menu {
  position: absolute; z-index: 6; bottom: calc(100% + 6px); left: 0; min-width: 210px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
}
.rs-more__menu .btn { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent; }
.rs-more__menu .btn:hover { background: var(--surface-2); }

/* tek satırlık bilgi notu (kart altlarındaki uyarıların yerine) */
.rs-note { display: flex; align-items: flex-start; gap: 8px; margin: 2px 2px 0; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.5; }
.rs-note .i { flex: none; margin-top: 2px; }

/* kart altı "Kaynak ve notlar" */
.srcnote { margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-3); }
.srcnote > summary { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; font-weight: 700; user-select: none; }
.srcnote > summary::-webkit-details-marker { display: none; }
.srcnote > summary:hover { color: var(--text-2); }
.srcnote[open] > summary { color: var(--text-2); }
.srcnote__body { margin-top: 4px; line-height: 1.5; }
.srcnote__body p { margin: 0 0 4px; }

/* talep satırı (üç tanıtım kartı yerine) */
.lead-row { display: flex; flex-direction: column; gap: 8px; }
.lead-row__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.lead-row__btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* ═══════════════ Genişlet: panel tam ekran ═══════════════ */
body.panel-wide .panel { right: var(--gap); width: auto; z-index: 45; background: var(--bg); }   /* opak: arkadaki harita ve düğmeleri görünmesin */
body.panel-wide .topbar, body.panel-wide .statusbar, body.panel-wide .draw-hud { visibility: hidden; }
body.panel-wide .panel__body { padding: 6px 24px 28px; }
body.panel-wide #resultBody { width: 100%; max-width: 1760px; margin: 0 auto; }
body.panel-wide .rs-top { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
body.panel-wide .gl { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
body.panel-wide .gl-tile { padding: 10px 12px; }
body.panel-wide .gl-tile__v { font-size: var(--fs-md); }
body.panel-wide .rs-groups { gap: 18px; }
body.panel-wide .rs-group.is-open .rs-group__body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start;
}
body.panel-wide .rs-group__peek { padding-left: 46px; }

@media (max-width: 980px) {
  body.panel-wide .rs-top { grid-template-columns: minmax(0, 1fr); }
}
/* telefonda (alt sayfa) Genişlet = tam yükseklik */
@media (max-width: 820px) {
  body.panel-wide .panel { top: var(--gap); max-height: none; }
  body.panel-wide .panel__body { padding: 4px 12px 18px; }
  body.panel-wide .rs-group.is-open .rs-group__body { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .rs-slot.is-flash > .card { animation: none; }
}
