/* Bildirimler paneli — mevcut panel görsel diliyle aynı ölçü ve renkler. */
:host { display: contents; }


.panel {
  --side: max(0px, calc((100vw - 820px) / 2));
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-inline: var(--side);
  /* TAM SAYFA: ortadaki sütun panel renginde, kenarlar sayfa renginde. */
  background: linear-gradient(var(--fiko-panel), var(--fiko-panel)) center / min(100%, 820px) 100% no-repeat, var(--fiko-bg);
  animation: page-fade 0.15s ease-out;
}
@keyframes page-fade { from { opacity: 0; } }

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--fiko-line, #262a35);

  h2 { margin: 0; font-size: 1.05rem; }
  .sub { margin: 0.2rem 0 0; font-size: 0.78rem; opacity: 0.7; }

  .x {
    background: none;
    border: 0;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
  }
}

.tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--fiko-line, #262a35);

  button {
    background: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    color: inherit;
    cursor: pointer;
  }

  .active {
    border-color: var(--fiko-accent, #6ea8fe);
    color: var(--fiko-accent, #6ea8fe);
  }

  .count {
    margin-left: 0.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--fiko-accent, #6ea8fe);
    color: #10121a;
    font-size: 0.7rem;
    font-weight: 600;
  }

  .refresh { margin-left: auto; opacity: 0.7; }
}

.list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card {
  border: 1px solid var(--fiko-line, #262a35);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: color-mix(in srgb, var(--fiko-text, #e8eaf0) 4%, transparent);
}

/* Bekleyen soru: henüz yanıtlanmamış olduğunu belli eder. */
.card.unread { border-color: color-mix(in srgb, var(--fiko-accent, #6ea8fe) 55%, transparent); }

.head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  opacity: 0.75;

  .kind {
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: color-mix(in srgb, var(--fiko-accent, #6ea8fe) 18%, transparent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.64rem;
  }

  .from { font-weight: 600; opacity: 1; }
  time { margin-left: auto; }
}

.text { margin: 0.45rem 0; font-size: 0.9rem; line-height: 1.45; }

.answer {
  margin: 0.3rem 0 0;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: color-mix(in srgb, #58c97f 14%, transparent);
  font-size: 0.85rem;

  .mark { color: #58c97f; margin-right: 0.3rem; }
}

.expires { margin: 0.2rem 0 0; font-size: 0.72rem; opacity: 0.6; }

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.opt {
  border: 1px solid color-mix(in srgb, var(--fiko-accent, #6ea8fe) 45%, transparent);
  border-radius: 999px;
  background: none;
  color: inherit;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;

  &:hover:not(:disabled) { background: color-mix(in srgb, var(--fiko-accent, #6ea8fe) 14%, transparent); }
  &:disabled { opacity: 0.5; cursor: progress; }
}

.free {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;

  input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--fiko-line, #262a35);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }

  .send {
    border: 1px solid var(--fiko-accent, #6ea8fe);
    border-radius: 8px;
    background: none;
    color: var(--fiko-accent, #6ea8fe);
    padding: 0 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;

    &:disabled { opacity: 0.4; cursor: default; }
  }
}

.wait { margin: 0.3rem 0 0; font-size: 0.72rem; opacity: 0.65; }

footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.link {
  background: none;
  border: 0;
  color: inherit;
  font-size: 0.74rem;
  opacity: 0.65;
  cursor: pointer;
  padding: 0;

  &:hover:not(:disabled) { opacity: 1; text-decoration: underline; }
  &:disabled { opacity: 0.35; cursor: default; }
}

.confirm {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;

  .danger {
    border: 1px solid #e06c75;
    border-radius: 6px;
    background: none;
    color: #e06c75;
    font-size: 0.74rem;
    padding: 0.1rem 0.4rem;
    cursor: pointer;
  }
}

.muted { opacity: 0.6; font-size: 0.85rem; }
.bad { margin: 0.6rem 1.1rem; color: #e06c75; font-size: 0.8rem; }

/* TAM SAYFA: "Sohbete dön" düğmesi başlığın başında (order), başlık soldan hizalı. */
header { justify-content: flex-start; gap: 1.1rem; }
header .x {
  order: -1; flex: none; margin: 0; opacity: 1; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--fiko-line); border-radius: 9px; background: none; color: var(--fiko-muted);
  font-size: 0.82rem; line-height: 1; padding: 0.5rem 0.8rem;
}
header .x:hover { color: var(--fiko-text); border-color: var(--fiko-accent-line); }
