/* ════════════════════════════════════════════════════════════════════
   KAAHIN · ŞEKİL DRAWER (Shape Drawer) — v30.1
   Alttan kayarak açılan kompakt şekil menüsü.
   HUD'daki .hud-shape-btn ile toggle olur.
   ════════════════════════════════════════════════════════════════════ */

/* Eski sağ panel kalıntıları — tamamen gizle */
.or-orakel--shapes,
.or-shapes-rail,
.or-shapes-rail-list { display: none !important; }

/* ─────────────────────────────────────────────────────────────────────
   HUD ŞEKİL BUTONU — ses butonuyla aynı stil (kırmızı border, küçük)
   ────────────────────────────────────────────────────────────────── */
.hud-seg.seg-shape {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .55rem;
}
.hud-shape-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(233, 32, 56, .55);
  border-radius: 0;
  color: var(--or-red, #E92038);
  cursor: pointer;
  font-family: var(--or-mono, monospace);
  transition: background .18s, border-color .18s, color .18s,
              box-shadow .18s, transform .18s;
  padding: 0;
}
.hud-shape-btn i { font-size: .82rem; transition: transform .25s ease; }
.hud-shape-btn:hover {
  background: var(--or-red, #E92038);
  color: #fff;
  border-color: var(--or-red, #E92038);
  box-shadow: 0 0 12px rgba(233, 32, 56, .55);
}
.hud-shape-btn.is-active {
  background: var(--or-red, #E92038);
  color: #fff;
  border-color: var(--or-red, #E92038);
  box-shadow: 0 0 14px rgba(233, 32, 56, .65);
}
.hud-shape-btn.is-active i { transform: rotate(45deg); }

/* ─────────────────────────────────────────────────────────────────────
   ŞEKİL DRAWER — alttan kayan kompakt panel
   ────────────────────────────────────────────────────────────────── */
.shape-drawer {
  position: fixed;
  left: 50%;
  bottom: calc(var(--or-hud, 64px) + 12px);
  transform: translateX(-50%) translateY(20px);
  width: min(880px, 94vw);
  max-width: 94vw;
  background: linear-gradient(180deg,
    rgba(10, 8, 10, 0.96) 0%,
    rgba(6, 4, 6, 0.98) 100%);
  border: 1px solid rgba(233, 32, 56, .4);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .7),
    0 0 30px rgba(233, 32, 56, .25),
    inset 0 0 0 1px rgba(255, 255, 255, .02);
  z-index: 9050;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease,
              transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--or-mono, monospace);
}
.shape-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Drawer üst bar — başlık + kapat */
.shape-drawer-bar {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .85rem;
  border-bottom: 1px solid rgba(233, 32, 56, .22);
  background: rgba(0, 0, 0, .35);
}
.shape-drawer-glyph {
  color: var(--or-red, #E92038);
  font-size: .85rem;
  text-shadow: 0 0 8px rgba(233, 32, 56, .6);
  animation: shapeDrawerGlyph 4s ease-in-out infinite;
}
@keyframes shapeDrawerGlyph {
  0%, 100% { opacity: .65; transform: rotate(0deg); }
  50%      { opacity: 1;   transform: rotate(180deg); }
}
.shape-drawer-title {
  font-size: .55rem;
  letter-spacing: .38em;
  color: #fff;
  font-weight: 500;
}
.shape-drawer-sub {
  flex: 1;
  font-size: .42rem;
  letter-spacing: .18em;
  color: var(--or-dim, rgba(255,255,255,.4));
  font-style: italic;
  font-family: Georgia, serif;
  text-transform: lowercase;
  letter-spacing: 0;
}
.shape-drawer-close {
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .65);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  transition: all .18s ease;
  padding: 0;
  border-radius: 50%;
}
.shape-drawer-close:hover {
  color: #fff;
  border-color: var(--or-red, #E92038);
  background: rgba(233, 32, 56, .18);
  transform: rotate(90deg);
}

/* Yatay kart listesi */
.shape-drawer-list {
  list-style: none;
  margin: 0;
  padding: .85rem .85rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 32, 56, .3) transparent;
}
.shape-drawer-list::-webkit-scrollbar { height: 4px; }
.shape-drawer-list::-webkit-scrollbar-track { background: transparent; }
.shape-drawer-list::-webkit-scrollbar-thumb {
  background: rgba(233, 32, 56, .28);
  border-radius: 2px;
}
.shape-drawer-list > li {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

/* ─────────────────────────────────────────────────────────────────────
   KÜÇÜK ŞEKİL KARTI (drawer içinde, ~%55 boyut)
   ────────────────────────────────────────────────────────────────── */
.shape-card {
  --card-glow: rgba(233, 32, 56, 0);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 0;
  width: 64px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.shape-card:focus { outline: none; }
.shape-card:focus-visible .shape-card-art {
  border-color: rgba(233, 32, 56, 0.85);
  box-shadow: 0 0 0 2px rgba(233, 32, 56, 0.35);
}

/* Görsel kutusu — küçük kare */
.shape-card-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #050505;
  background-image: var(--shape-img);
  background-size: 78% auto;
  background-repeat: no-repeat;
  background-position: center 52%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s ease,
              box-shadow 0.35s ease,
              transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.3s ease;
  filter: brightness(1.0) contrast(1.05) saturate(0.92);
}
.shape-card-art::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%,
      transparent 55%,
      rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.85;
  transition: opacity 0.3s;
}
.shape-card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.3;
}

/* Etiket — çok küçük */
.shape-card-label {
  display: block;
  text-align: center;
  font-family: var(--or-mono, 'JetBrains Mono', monospace);
  font-size: 7.5px;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  padding: 0 2px;
  line-height: 1.2;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* HOVER */
.shape-card:hover {
  --card-glow: rgba(233, 32, 56, 0.35);
}
.shape-card:hover .shape-card-art {
  border-color: rgba(233, 32, 56, 0.45);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55),
    0 0 10px var(--card-glow);
  transform: translateY(-2px);
  filter: brightness(1.1) contrast(1.12) saturate(1);
}
.shape-card:hover .shape-card-art::before { opacity: 0.55; }
.shape-card:hover .shape-card-label {
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.26em;
}

/* AKTİF */
.shape-card.is-active {
  --card-glow: rgba(233, 32, 56, 0.7);
}
.shape-card.is-active .shape-card-art {
  border-color: var(--or-red, #E92038);
  box-shadow:
    0 0 0 1px rgba(233, 32, 56, 0.45),
    0 4px 18px rgba(0, 0, 0, 0.6),
    0 0 14px rgba(233, 32, 56, 0.5),
    inset 0 0 12px rgba(233, 32, 56, 0.18);
  filter: brightness(1.15) contrast(1.18) saturate(1.05);
  animation: shapeCardPulse 4s ease-in-out infinite;
}
.shape-card.is-active .shape-card-art::before { opacity: 0.4; }
.shape-card.is-active .shape-card-label {
  color: #fff;
  text-shadow: 0 0 8px rgba(233, 32, 56, 0.55);
  letter-spacing: 0.28em;
}

@keyframes shapeCardPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(233, 32, 56, 0.45),
      0 4px 18px rgba(0, 0, 0, 0.6),
      0 0 14px rgba(233, 32, 56, 0.5),
      inset 0 0 12px rgba(233, 32, 56, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(233, 32, 56, 0.6),
      0 4px 18px rgba(0, 0, 0, 0.6),
      0 0 20px rgba(233, 32, 56, 0.7),
      inset 0 0 16px rgba(233, 32, 56, 0.28);
  }
}

.shape-card:active .shape-card-art { transform: translateY(0) scale(0.95); }

/* ─────────────────────────────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .shape-drawer { width: 96vw; bottom: calc(var(--or-hud, 64px) + 8px); }
  .shape-drawer-list { padding: .6rem .55rem .75rem; gap: 6px; }
  .shape-card { width: 56px; }
  .shape-card-label { font-size: 7px; letter-spacing: 0.18em; }
  .shape-drawer-sub { display: none; }
}
