/* =========================================================
   styles/report.css
   Looker Studio Iframe Çerçevesi ve Üst Menü (Header)
   ========================================================= */

#report-shell { position: fixed; inset: 0; display: none; background: var(--bg); box-sizing: border-box; z-index: 5; flex-direction: column; }
#report-shell.visible { display: flex; }
#report-row { flex: 1 1 auto; display: flex; flex-direction: row; align-items: stretch; padding: 0; box-sizing: border-box; width: 100%; height: 100%; }
#report-left { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

#report-top { flex: 0 0 var(--topbar); position: relative; display: flex; align-items: stretch; justify-content: flex-start; background: #ffffff; border-top: 1px solid #e2e8f0; color: #666666; padding: 0; box-sizing: border-box; }
#header-left { flex: 0 0 30%; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 12px; box-sizing: border-box; border-right: 1px solid #e2e8f0; overflow: hidden; }
#header-right { flex: 0 0 70%; display: flex; align-items: center; position: relative; overflow: hidden; padding: 0; box-sizing: border-box; }
#header-right img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

#brand-wrapper { display: flex; align-items: center; gap: 10px; min-width: 0; }
#brand-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; color: var(--txt); }

#report-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; height: var(--topbar); padding-right: 52px; }
.select-wrap { display: none !important; }

.top-btn {
  position: absolute; right: 10px; top: 8px; margin: 0; width: 28px; height: 28px; padding: 0; background: transparent;
  color: #666666; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0;
}
.top-btn::before { content: "⛶"; font-size: 18px; line-height: 1; }
.top-btn:hover { background: rgba(0, 0, 0, .05); border-radius: 6px; }
.top-btn::after {
  content: "Tam Ekran"; position: absolute; top: 50%; right: calc(100% + 12px); transform: translateY(-50%);
  background: rgba(18, 39, 31, 0.92); color: #E5F2D2; border: 1px solid rgba(229, 242, 210, 0.18); box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  padding: 6px 10px; border-radius: 999px; font-size: 10px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.top-btn:hover::after { opacity: 1; }

#report-main { position: relative; flex: 1 1 auto; height: 100%; background: var(--bg); overflow: hidden; }
#report-frame { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 32px) !important; border: 0; background: #ffffff; z-index: 1; }

/* Tam Ekran Durumu */
body.pfs { overflow: hidden; }
body.pfs #report-top { display: none; }
body.pfs #report-row { padding: 0; }
body.pfs #report-main iframe#report-frame { width: 100vw; height: 100vh; height: 100dvh; }
#fs-exit { position: fixed; top: 10px; right: 10px; z-index: 10000; display: none; padding: 10px 12px; line-height: 1; font-weight: 700; border-radius: 999px; border: 1px solid #ffffff; color: #ffffff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(4px); cursor: pointer; }
#fs-exit:active { transform: scale(.98); }
body.fs #fs-exit { display: block; }

@media (max-width: 820px) {
  :root { --topbar: 48px; }

  /* Üst bar referansımız */
  #report-top { 
    position: relative !important; 
    display: flex !important; 
    align-items: center !important; 
    width: 100% !important; 
  }

  /* Kapsayıcıların menüyü kesmesini (kırpmasını) engelliyoruz */
  #header-left, #brand-wrapper, #report-actions { 
    overflow: visible !important; 
    position: static !important; 
  }

  /* Gereksizleri gizliyoruz */
  #header-right, #btn-fullscreen { 
    display: none !important; 
  }

  /* Eğer YENİ HTML'i kullandıysan bu alan gizli kalmasın diye zorla açıyoruz */
  #mobile-right-area {
    display: block !important;
    position: static !important;
  }

  /* MENÜYÜ SAĞA ÇİVİLE VE SABİT BOYUT VER (Kaybolmayı engeller) */
  .select-wrap { 
    display: block !important; 
    position: absolute !important; 
    right: 15px !important; 
    top: 50% !important; 
    transform: translateY(-50%) !important; 
    width: 40px !important; 
    height: 40px !important; 
    z-index: 9999 !important; 
  }

  /* İKON TASARIMI (Rengini ve boyutunu zorluyoruz) */
  .report-select {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    font-size: 28px !important;
    color: var(--txt, #333) !important; /* İkonun rengi */
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    outline: none !important;
    line-height: 40px !important;
    text-align: right !important;
  }
}