/* ================= POLL ================= */

.tc-poll-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tc-pill {
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  background: var(--pill-bg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tc-pill span:first-child {
  color: var(--text);
}

.tc-pill span:last-child {
  color: var(--accent-strong);
  font-size: 12px;
}

.tc-pill:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.75);
}

.tc-pill.active {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
  background: rgba(250, 204, 21, 0.08);
  color: var(--accent-strong);
}

.tc-pill-result {
  position: relative;
  overflow: hidden;
}

.tc-pill-result::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 0%);
  background: linear-gradient(
    to right,
    rgba(250, 204, 21, 0.18),
    rgba(250, 204, 21, 0.06)
  );
  pointer-events: none;
  z-index: 0;
  transition: width 0.35s var(--transition-fast);
}

.tc-pill-result span {
  position: relative;
  z-index: 1;
}

.tc-pill-result:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8);
  border-color: var(--accent-strong);
}

/* ================= TIER LIST ================= */

.tier-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.tier-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

/* Havuz */

.tier-items-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 7px;
  border-radius: 13px;
  border: 1px dashed rgba(107, 114, 128, 0.9);
  min-height: 80px;
  background: rgba(4, 6, 12, 0.98);
}

/* Item */

.tier-item {
  position: relative;
  max-width: 150px;
  width: auto;
  max-height: none;
  height: auto;
  border-radius: 11px;
  overflow: hidden;
  cursor: grab;
  border: 1px solid rgba(75, 85, 99, 0.95);
  background: #020817;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.tier-item img {
  display: block;
  width: 100% !important;
  height: auto !important;
  object-fit: contain;
}

.tier-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8);
  border-color: var(--accent-strong);
}

.tier-item.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tier-item-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.85);
  color: #F9FAFB;
  font-size: 13px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tier-item-remove:hover {
  background: rgba(248, 113, 113, 0.95);
}

/* Satırlar */

.tier-row {
  display: flex;
  gap: 7px;
  align-items: stretch;
}

.tier-label {
  min-width: 64px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 253, 0.35);
  background: rgba(9, 9, 15, 0.98);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tier-label.S {
  background: linear-gradient(135deg, #ff521b, rgba(216, 68, 0, 0.9));
}
.tier-label.A {
  background: linear-gradient(135deg, #facc14, rgba(212, 156, 0, 0.9));
}
.tier-label.B {
  background: linear-gradient(135deg, #32936f, rgba(2, 156, 28, 0.9));
}
.tier-label.C {
  background: linear-gradient(135deg, #4d9de0, rgba(129, 141, 248, 0.9));
}
.tier-label.D {
  background: linear-gradient(135deg, #f397d6, rgba(136, 6, 129, 0.9));
}

.tier-drop {
  flex: 1;
  min-height: 80px;
  padding: 7px;
  border-radius: 11px;
  border: 1px solid rgba(75, 85, 99, 0.95);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  background: rgba(4, 6, 12, 0.98);
}

/* Drag state */

.tier-drop.drag-over,
.tier-items-pool.drag-over {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.16);
}

/* ================= RANDOM PICKER / ÇARK ================= */

.tc-rp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 24px;
  margin-top: 18px;
}

.tc-rp-input-card,
.tc-rp-wheel-card {
  align-items: stretch;
}

.tc-rp-help {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 8px;
}

.tc-rp-textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.5;
  background: #020817;
  color: var(--text);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 253, 0.35);
}

.tc-rp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tc-rp-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  gap: 6px;
  flex-wrap: wrap;
}

.tc-rp-warning {
  color: var(--error);
}

.tc-rp-wheel-card {
  align-items: center;
  text-align: center;
}

/* Wheel container */

.tc-rp-wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-rp-wheel-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

/* Pointer */

.tc-rp-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 18px solid var(--accent-strong);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}

.tc-rp-spin-btn {
  width: 100%;
  max-width: 260px;
  margin-top: 2px;
}

.tc-rp-result {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.tc-rp-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
}

.tc-rp-winner {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-strong);
  text-align: center;
}

.tc-rp-footnote {
  margin-top: 14px;
  font-size: 10px;
  color: var(--muted);
  text-align: left;
}

/* ================= GIPHY ================= */

.giphy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.giphy-modal-inner {
  width: min(720px, 96vw);
  max-height: 80vh;
  background: var(--bg-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 14px 14px 10px;
  border: 1px solid rgba(148, 163, 253, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  min-height: 0;
}

.giphy-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.giphy-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.96);
  color: #facc15;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.giphy-search-input {
  flex: 1 1 auto;
  font-size: 13px;
  width: 100%;     /* tc-input'taki width:100%'ü kır */
  min-width: 0;    /* flex içinde düzgün küçülsün */
}

.giphy-search-input {
  flex: 1;
  font-size: 13px;
}

.giphy-search-btn {
  white-space: nowrap;
}

.giphy-info {
  font-size: 11px;
  color: var(--muted);
}

/* INLINE panel */

#giphy-modal {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
  padding: 10px 10px 8px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.03), transparent),
    rgba(5, 7, 15, 0.98);
  border: 1px solid rgba(148, 163, 253, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

#giphy-modal .giphy-modal-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-strong);
}

#giphy-modal .giphy-info {
  font-size: 10px;
  color: var(--muted);
}

#giphy-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 4px;
  margin-top: 4px;
  box-sizing: border-box;
  align-items: flex-start;
}

#giphy-results::-webkit-scrollbar {
  width: 6px;
}
#giphy-results::-webkit-scrollbar-track {
  background: transparent;
}
#giphy-results::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 253, 0.35);
  border-radius: 999px;
}

.giphy-thumb-wrap {
  box-sizing: border-box;
  flex: 0 0 calc(25% - 6px);
  margin: 0;
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.9);
  background: #020817;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    border-color 0.15s ease-out;
}

.giphy-thumb-wrap:hover {
  transform: scale(1.03);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
}

.giphy-thumb-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.giphy-thumb-label {
  position: absolute;
  left: 4px;
  bottom: 3px;
  font-size: 9px;
  color: #e5e7eb;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}

#giphy-load-more {
  margin-top: 6px;
  align-self: center;
  display: none;
}

/* Okuyorum Ama Yargılamıyorum - emoji stilleri */
.oa-post-reactions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.oa-post-reactions .oa-emoji-btn {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text); /* DARK + LIGHT için ortak */
}

.oa-post-reactions .oa-emoji-btn span[data-count] {
  font-size: 12px;
  color: var(--text); /* siyah yerine tema yazısı */
}

/* Aktif reaction */
.oa-post-reactions .oa-emoji-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
}
