@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
}

/* 🎨 Dashboard ve genel stiller */
.mirror-preview {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 3px solid #475569;
  border-radius: 20px;
}

.widget-card {
  transition: all 0.3s ease;
  cursor: grab;
}
.widget-card:active { cursor: grabbing; }
.widget-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.sortable-ghost { opacity: 0.4; }

.login-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   🧭 WALKTHROUGH (REHBER) STİLLERİ
   ======================================== */

/* Overlay: Arka plan blur'u */
#wt-overlay {
  position: fixed;
  inset: 0;
   z-index: 99998 !important;
  background: transparent;
  backdrop-filter: blur(5px); /* Tüm sayfa için hafif blur */
  display: none;
  pointer-events: none;
}
#wt-overlay.active { 
  display: block; 
}

/* Tooltip penceresi */
#wt-tooltip {
  position: fixed;
  z-index: 4300;
  max-width: 420px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,.18);
  padding: 18px 18px 14px 18px;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}
#wt-tooltip.show {
  transform: scale(1);
  opacity: 1;
}

/* Tooltip başlık */
#wt-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

/* Tooltip metin */
#wt-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

/* Üst satır (progress) */
#wt-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
#wt-progress {
  font-size: 12px;
  color: #6b7280;
}

/* Progress noktaları */
#wt-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
#wt-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d1d5db;
}
#wt-dots span.active {
  background: #6366f1;
}

/* Butonlar */
#wt-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.wt-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.wt-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.wt-btn-primary {
  background: linear-gradient(135deg, #6366f1, #7c3aed)  !important;
  border: none !important;
  color: #fff  !important;
}
.wt-btn-primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

/* Kapatma butonu */
#wt-closeX {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: all .2s ease;
}
#wt-closeX:hover {
  background: #e5e7eb;
  color: #111827;
}

/* Ok işareti - Modern & Şık */
#wt-arrow {
  position: fixed;
  z-index: 4250;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
#wt-arrow.show { 
  opacity: 1;
  animation: arrow-pulse 2s ease-in-out infinite;
}

/* Ok çizgisi - Gradyan + glow */
#wt-arrow .line {
  stroke: url(#arrow-gradient);
  stroke-width: 3.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6)) 
          drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

/* Ok başı - Gradyan */
#wt-arrow .head {
  fill: url(#arrow-gradient);
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.5));
}

/* Hafif nabız animasyonu */
@keyframes arrow-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

/* ========================================
   🔍 BLUR & FOCUS SİSTEMİ
   ======================================== */

/* Blurlu elementler */
.wt-dim {
  filter: blur(5px) !important;
  pointer-events: none !important;
  transition: filter 0.3s ease;
}

/* Odaktaki element (blur'dan çıkar) */
.wt-focus {
  position: relative !important;
  z-index: 100000 !important;
  pointer-events: auto !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  transform: translateZ(0) !important; /* GPU katmanına taşı */
  will-change: transform !important;
}

/* Odaktaki elementin içindekiler de blursuz */
.wt-focus *,
.wt-focus::before,
.wt-focus::after {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
}

/* Hem .wt-dim hem .wt-focus varsa focus kazansın */
.wt-dim.wt-focus {
  filter: none !important;
  pointer-events: auto !important;
}

/* ========================================
   🎯 YARDIMCI SINIFLAR
   ======================================== */

/* Tooltip sağ üst sabitleme */
.wt-fixed-tr {
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  translate: none !important;
}

/* Fade animasyonu */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

/* Overlay açıkken tooltip ve ok tıklanabilir */
#wt-overlay.active #wt-tooltip,
#wt-overlay.active #wt-arrow {
  pointer-events: auto;
}

/* 💡 Bilgi İkonu Animasyonu */
.group:hover .w-10 {
  transform: scale(1.1);
}

/* Tooltip ok animasyonu */
@keyframes tooltip-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.group:hover + div {
  animation: tooltip-bounce 0.6s ease-in-out;
}

/* ========================================
    TOAST BİLDİRİM SİSTEMİ
   ======================================== */

#toast-container {
  max-width: 420px;
}

.toast {
  pointer-events: auto;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(400px);
  opacity: 0;
}

/* Toast türleri */
.toast-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.toast-progress-bar {
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  transition: width 50ms linear;
}

/* Toast animasyonu */
@keyframes toast-slide-in {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* 💻 KÜÇÜK LAPTOP (1366x768 ve benzeri) */
@media (max-width: 1366px) and (max-height: 800px) {
  #wt-overlay {
    backdrop-filter: blur(3px) !important; /* Daha az blur */
  }

  #wt-tooltip {
    max-width: 380px !important;
    padding: 14px;
    font-size: 13px;
  }

  #wt-title {
    font-size: 15px;
  }

  #wt-text {
    font-size: 13px;
    line-height: 1.4;
  }

  #wt-arrow {
    display: none !important; /* Okları gizle */
  }

  /* Focus highlight daha ince */
  .wt-focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 4px !important;
  }
}

/* 📱 MOBİL */
@media (max-width: 767px) {
  #wt-tooltip {
    max-width: 92vw !important; /* ✅ Biraz küçült */
    width: 340px !important; /* ✅ Daha dar */
    padding: 16px !important;
    padding-bottom: 55px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
   /* ✅ Mobilde overlay de yüksek olsun */
  #wt-overlay {
    z-index: 99999 ;
  }
  
  /* ✅ Mobilde focus tooltip'in altında */
  .wt-focus {
    z-index: 99998 !important;
    position: relative !important;
  }

  #wt-title {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }

  #wt-text {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important; /* ✅ Butonlardan boşluk */
  }

  #wt-controls {
    position: absolute !important;
    bottom: 12px !important;
    left: 18px !important;
    right: 18px !important;
    margin-top: 0 !important;
  }

  #wt-arrow {
    display: none !important;
  }

  .wt-btn {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }

  /* ✅ Rehber açıkken blur'lu elementler daha arkada kalsın */
  .wt-dim {
    z-index: 1 !important;
  }

  .wt-focus {
    z-index: 100000 !important; /* Tooltip'ten bir alt */
  }


}
}


/* Geri Bildirim Butonu Animasyonu */
#feedbackFloatingBtn {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Radio button label hover efekti */
label:has(input[type="radio"]) {
  transition: all 0.2s ease;
}

label:has(input[type="radio"]:checked) {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
}

/* ========================================
   📱 MOBİL 3x3 GRID SİSTEMİ (DEMO'DAN)
   Demo'da %100 çalışan sistem - Taşma yok!
   ======================================== */

/* Tüm mobil cihazlar için */
@media (max-width: 768px) {
  
  /* PARENT CONTAINER'LARI EZ - Tam genişlik */
  body {
    overflow-x: hidden !important;
  }

  .max-w-\[1600px\] {
    max-width: 100% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .grid-cols-1 {
    display: block !important;
  }

  .lg\:col-span-2 {
    width: 100% !important;
    padding: 0 !important;
  }

  /* Ayna önizleme kartı - Padding'i azalt */
  .lg\:col-span-2 > .bg-white {
    padding: 0.5rem !important;
    margin: 0 !important;
  }

  /* Mirror Preview Container - TAM GENIŞLIK KARE */
  .mirror-preview {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0.75rem !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Grid Container - 3x3 Düzen */
  #mirror-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(3, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
  }

  /* Widget Kartları - Kare ve Responsive */
  .widget-zone {
    aspect-ratio: 1 !important;
    min-height: unset !important;
    max-height: unset !important;
    overflow: hidden !important;
  }

  .widget-content {
    padding: 10px !important;
    font-size: 0.7rem !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Widget başlıkları */
  .widget-content .text-2xl,
  .widget-content .text-lg,
  .widget-content .text-sm {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.25rem !important;
  }

  /* Widget metinleri */
  .widget-content .text-xs,
  .widget-content .opacity-75 {
    font-size: 0.65rem !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  /* İkonlar */
  .widget-content i {
    font-size: 1.25rem !important;
    margin-bottom: 0.25rem !important;
  }

  /* Saat widget'ı özel */
  #current-time {
    font-size: 1rem !important;
    font-weight: bold !important;
  }

  #current-date {
    font-size: 0.6rem !important;
  }

  /* Logo widget'ı */
  .logo-img {
    max-width: 32px !important;
    max-height: 32px !important;
  }

  .logo-icon {
    font-size: 1.5rem !important;
  }

  /* Remove button - mobilde daha küçük */
  .widget-content button {
    width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
    top: 4px !important;
    right: 4px !important;
  }

.widget-content {
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
  }


  /* Empty zone indicator */
  .empty-zone-indicator {
    padding: 0.5rem !important;
    font-size: 0.65rem !important;
  }

  .empty-zone-indicator i {
    font-size: 1rem !important;
    margin-bottom: 0.25rem !important;
  }
}

/* Çok küçük ekranlar (360px altı) */
@media (max-width: 360px) {
  #mirror-grid {
    gap: 8px !important;
  }

  .mirror-preview {
    padding: 8px !important;
  }

  .widget-content {
    padding: 8px !important;
    font-size: 0.65rem !important;
  }

  .widget-content i {
    font-size: 1rem !important;
  }
}

/* Tablet ve üzeri - Normal görünüm */
@media (min-width: 769px) {
  .mirror-preview {
    max-width: 1000px !important;
  }
  
  #mirror-grid {
    gap: 1.5rem !important;
  }
}




/* Mobil menü butonları - kompakt tasarım */
#mobile-menu .space-y-2 > * {
  display: block !important;
}

#mobile-menu button,
#mobile-menu select {
  font-size: 0.875rem !important;
  padding: 0.75rem 1rem !important;
  min-height: auto !important;
}

#mobile-menu .space-y-2 {
  gap: 0.5rem;
}

#mobile-menu i {
  font-size: 1rem !important;
}

#mobile-menu .px-4 {
  max-height: 70vh;
  overflow-y: auto;
}

/* Drag-drop hover efektini kapat */
.widget:hover,
.widget.drag-over,
.widget-zone:hover,
#mirror-grid .widget:hover,
#mirror-grid .widget.drag-over,
.drop-zone:hover,
.drop-zone.drag-over {
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

.drop-indicator,
.drag-placeholder,
.widget-drop-zone {
  display: none !important;
  visibility: hidden !important;
}/* Drag-drop hover efektini kapat */
.widget:hover,
.widget.drag-over,
.widget-zone:hover,
#mirror-grid .widget:hover,
#mirror-grid .widget.drag-over,
.drop-zone:hover,
.drop-zone.drag-over {
  border: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

.drop-indicator,
.drag-placeholder,
.widget-drop-zone {
  display: none !important;
  visibility: hidden !important;
}
