/* ============================================================
   FK GLOBAL MADENCİLİK - HEADLESS VISUAL CMS & ADMIN STYLES
   ============================================================ */

/* --- 1. Gizli Tetikleyici (Bottom-Left Secret Trigger) --- */
#fk-admin-secret-trigger {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 9980;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.25;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f59e0b;
}

#fk-admin-secret-trigger:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

@media (max-width: 1024px) {
  #fk-admin-secret-trigger {
    bottom: 65px; /* Mobil dock çubuğunun hemen üzerinde */
    left: 12px;
  }
}

/* --- 2. Üst Kayan Admin Kontrol Çubuğu (Admin Toolbar) --- */
body.fk-admin-active {
  padding-top: 52px !important;
}

#fk-admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 9995;
  background: rgba(8, 12, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.fk-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.fk-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
}

.fk-admin-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.fk-admin-btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  color: #ffffff !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35);
}

.fk-admin-btn-gold:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.fk-admin-toggle-active {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
}

/* --- 3. Canlı Tıkla-Düzenle Vurguları (Inline Edit Mode) --- */
.fk-edit-mode-on [data-i18n] {
  position: relative;
  transition: outline 0.15s ease, background-color 0.15s ease;
  cursor: cell !important;
}

.fk-edit-mode-on [data-i18n]:hover {
  outline: 2px dashed #f59e0b !important;
  outline-offset: 2px;
  background-color: rgba(245, 158, 11, 0.1) !important;
  border-radius: 4px;
}

.fk-edit-mode-on [data-i18n]::after {
  content: '✎';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: #f59e0b;
  color: #000;
  border-radius: 50%;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  z-index: 10;
}

.fk-edit-mode-on [data-i18n]:hover::after {
  opacity: 1;
}

/* Resim düzenleme rozeti */
.fk-image-editable-wrap {
  position: relative;
}

.fk-edit-mode-on .fk-image-editable-wrap:hover::before {
  content: '📷 Görseli Değiştir';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  color: #fbbf24;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  border: 2px dashed #f59e0b;
  border-radius: 8px;
}

/* --- 4. Hızlı Metin Düzenleme Popover Penceresi --- */
#fk-quick-edit-popover,
#fk-image-edit-popover {
  position: fixed !important;
  z-index: 999999 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  box-sizing: border-box !important;
}

#fk-quick-edit-popover {
  width: 380px;
  background: #0d131f;
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.15);
  display: none;
  color: #f4f4f5;
  font-family: 'Inter', system-ui, sans-serif;
  animation: fkPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#fk-quick-edit-popover::-webkit-scrollbar,
#fk-image-edit-popover::-webkit-scrollbar {
  width: 6px;
}
#fk-quick-edit-popover::-webkit-scrollbar-thumb,
#fk-image-edit-popover::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 4px;
}

@keyframes fkPopIn {
  from { opacity: 0; transform: scale(0.95) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- 5. 2FA Giriş Modalı & Cam Efekti --- */
.fk-glass-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(3, 5, 8, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fk-glass-card {
  background: linear-gradient(145deg, #0e1626, #060a12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.1);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  color: #f4f4f5;
  position: relative;
  overflow: hidden;
}

.fk-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

/* --- 6. Simüle SMS Push Bildirimi (Canlı Bildirim Kartı) --- */
#fk-sms-banner {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10020;
  width: 360px;
  max-width: 90vw;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  display: none;
  animation: fkSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fkSlideDown {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- 7. Büyük Yönetim Paneli (Executive CMS Modal) & Modüler Pencereler --- */
.fk-cms-window {
  background: #090e17;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 40px rgba(245, 158, 11, 0.1);
}

#fk-admin-cms-modal .fk-cms-window {
  width: 96vw;
  max-width: 1260px;
  height: 88vh;
}

.fk-tab-btn {
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #a1a1aa;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fk-tab-btn:hover {
  color: #f4f4f5;
}

.fk-tab-btn.active {
  color: #fbbf24;
  border-bottom-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

/* Özel Scrollbar */
.fk-custom-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.fk-custom-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.fk-custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.3);
  border-radius: 3px;
}
.fk-custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}

/* --- 8. Sayfa İçi Hızlı Ekleme Çubukları (In-Page Section Trigger Bars) --- */
.in-page-admin-trigger-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.85));
  border: 1px dashed rgba(245, 158, 11, 0.5);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: fkPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.in-page-admin-trigger-bar .trigger-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fcd34d;
  letter-spacing: 0.02em;
}

.in-page-admin-trigger-bar .trigger-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- 9. Dinamik Sayfa İnşa Çubuğu (Page Builder Toolbar) --- */
.fk-page-builder-toolbar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.fk-builder-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.15);
  color: #fef3c7;
}

.fk-builder-btn:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

/* --- 10. Canlı Kart Admin Eylemleri (Edit / Delete Mini Pills) --- */
.admin-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  padding: 3px 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  z-index: 35;
}

.admin-card-actions .admin-edit-btn,
.admin-card-actions .admin-del-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: none;
}

.admin-card-actions .admin-edit-btn {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.admin-card-actions .admin-edit-btn:hover {
  background: #f59e0b;
  color: #090e17;
}

.admin-card-actions .admin-del-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.admin-card-actions .admin-del-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Responsive Düzenlemeler */
@media (max-width: 640px) {
  .in-page-admin-trigger-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .in-page-admin-trigger-bar .trigger-label {
    justify-content: center;
  }
  .in-page-admin-trigger-bar .trigger-actions {
    justify-content: center;
  }
  .fk-page-builder-toolbar {
    padding: 12px;
  }
  .fk-builder-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   11. ÖZEL KURUMSAL ONAY & BİLDİRİM DİYALOGLARI (FK MODAL ENGINE)
   ============================================================ */
#fk-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(3, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

#fk-dialog-backdrop.active {
  opacity: 1;
}

.fk-dialog-box {
  width: 100%;
  max-width: 440px;
  background: #0b0f19;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.15);
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

#fk-dialog-backdrop.active .fk-dialog-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.fk-dialog-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b, #fbbf24, #f59e0b, transparent);
}

.fk-dialog-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
}

.fk-dialog-icon-wrapper.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.fk-dialog-icon-wrapper.danger {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.25);
}

.fk-dialog-icon-wrapper.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.fk-dialog-icon-wrapper.info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.25);
}

/* --- 12. Medya Kütüphanesi Sürükle Bırak Yükleme Alanı --- */
.fk-dropzone {
  border: 2px dashed rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.03);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.fk-dropzone:hover, .fk-dropzone.dragover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.15);
}

.fk-nav-dynamic-badge {
  display: inline-block;
  font-size: 9px;
  font-family: monospace;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  margin-left: 6px;
}

