/* ============================================================
   DOSYA SORUMLULUGU — screens-09-ai-analiz.css
   ------------------------------------------------------------
   NE YAPAR   : AI Analiz ekrani (Obsidian Intelligence) — kart, cikti, eylem satiri.
   KAYNAK     : v3.12.0'da bolundu — kurallar birebir tasindi,
                hicbir kural yeniden yazilmadi veya siralanmadi.
   SIRA       : index.html'deki <link> sirasi kaskadi belirler.
                Bu dosyanin sirasini DEGISTIRME.
   ------------------------------------------------------------
   Tam dosya listesi ve sira: BAGIMLILIK-HARITASI.md
   ============================================================ */

/* ============================================================
   AI ANALİZ — OBSIDIAN INTELLIGENCE
   ============================================================ */

/* JetBrains Mono for terminal feel */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap');

/* ── SEGMENT CONTROL ── */
.ai-seg-wrap {
  padding: 14px 14px 0;
  position: relative;
}
.ai-seg-track {
  display: flex;
  background: #111;
  border-radius: 10px;
  padding: 3px;
  position: relative;
  gap: 0;
  overflow: hidden;
}
.ai-seg-pill {
  position: absolute;
  top: 3px;
  height: calc(100% - 6px);
  background: var(--orange);
  border-radius: 7px;
  transition: left 0.28s cubic-bezier(0.4,0,0.2,1), width 0.28s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  z-index: 0;
}
.ai-seg-btn {
  flex: 1;
  position: relative;
  z-index: 1;
  height: 34px;
  background: transparent;
  border: none;
  border-radius: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}
.ai-seg-btn.active {
  color: #fff;
}

/* ── WARNING ── */
.ai-warn-box {
  display: none;
  margin: 10px 14px 0;
  padding: 10px 14px;
  background: #0F0F0F;
  border: 1px solid rgba(232,93,0,0.25);
  border-left: 2.5px solid var(--orange);
  border-radius: 0 10px 10px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,180,60,0.75);
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.ai-warn-box.visible { display: block; }

/* ── MAIN CARD ── */
.ai-card {
  margin: 12px 14px 0;
  background: #080808;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
/* Gradient border via pseudo */
.ai-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(160deg, var(--orange) 0%, rgba(232,93,0,0.3) 50%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* Dot grid texture */
.ai-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 16px;
  pointer-events: none;
  z-index: 0;
}

/* ── CARD HEADER ── */
.ai-card-header {
  position: relative;
  z-index: 1;
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ai-card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--orange), #FF9A40);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(232,93,0,0.35);
}
.ai-card-titles { flex: 1; }
.ai-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.ai-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

/* ── READY DOT ── */
.ai-ready-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  animation: ai-pulse 2s infinite;
}
@keyframes ai-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.ai-ready-dot.generating {
  animation: ai-spin-arc 0.8s linear infinite;
  background: transparent;
  border: 2px solid var(--orange);
  border-top-color: transparent;
}
@keyframes ai-spin-arc {
  to { transform: rotate(360deg); }
}
.ai-ready-dot.done {
  animation: none;
  background: #22C55E;
}

/* ── GENERATE BUTTON ── */
.ai-btn-row {
  position: relative;
  z-index: 1;
  padding: 14px 14px 0;
  display: flex;
  gap: 8px;
}
.ai-btn-generate {
  flex: 1;
  height: 52px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 4px 20px rgba(232,93,0,0.4);
}
.ai-btn-generate:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(232,93,0,0.3);
}
.ai-btn-regen {
  height: 52px;
  padding: 0 16px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
  font-family: var(--font);
}
.ai-btn-regen:active { transform: scale(0.96); }

/* ── OUTPUT WRAP ── */
.ai-output-wrap {
  display: none;
  position: relative;
  z-index: 1;
  padding: 14px 14px 0;
}
.ai-output-wrap.visible { display: block; }

/* ── META ROW ── */
.ai-output-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ai-created-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}
.ai-char-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.3);
  transition: color 0.3s;
}
.ai-char-count.warn { color: #FCD34D; }
.ai-char-count.danger { color: #F87171; }

/* ── READ VIEW ── */
.ai-read-view {
  background: #0D0D0D;
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(232,93,0,0.4) transparent;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.ai-read-view.revealed {
  opacity: 1;
  transform: translateY(0);
}
.ai-read-view::-webkit-scrollbar { width: 3px; }
.ai-read-view::-webkit-scrollbar-track { background: transparent; }
.ai-read-view::-webkit-scrollbar-thumb { background: rgba(232,93,0,0.4); border-radius: 2px; }

/* ── EDIT VIEW ── */
.ai-edit-view {
  display: none;
  width: 100%;
  min-height: 300px;
  background: #0D0D0D;
  border: 1.5px solid var(--orange);
  border-radius: 10px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.85);
  line-height: 1.75;
  resize: vertical;
  text-transform: none;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232,93,0,0.12);
}
.ai-edit-view.visible { display: block; }

/* ── TRIMMED NOTE ── */
.ai-trimmed-note {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(252,211,77,0.6);
  margin-top: 6px;
  letter-spacing: 0.03em;
  display: none;
}
.ai-trimmed-note.visible { display: block; }

/* ── ACTION ROW ── */
.ai-action-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 14px;
}
.ai-btn-edit {
  flex: 1;
  height: 44px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, transform 0.1s;
}
.ai-btn-edit:active { transform: scale(0.97); }

.ai-btn-copy {
  flex: 1;
  height: 44px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, transform 0.1s;
  letter-spacing: -0.2px;
}
.ai-btn-copy:active { transform: scale(0.97); }
.ai-btn-copy.copied {
  background: #16A34A;
}

