/**
 * ITS Rugby Live — Admin panel + live comment styles.
 *
 * Uses CSS variables from itsrugby-common.css
 * (--teal, --teal-dk, --border, --white, --sage-lt, --g-bright, --red, --muted)
 */

/* ── Fade-in animation for new comments ────── */

.live-fadein {
  animation: itsLiveFade .35s ease-out;
}
@keyframes itsLiveFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Empty placeholder ───────────────────────── */

.live-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted, #6B6B6B);
  font-size: 13px;
  font-style: italic;
}

/* ── Delete button on comments (admin only) ─── */

.live-del {
  margin-left: auto;
  padding: 2px 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted, #6B6B6B);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  opacity: 0;
  transition: all .15s;
  flex-shrink: 0;
}
.live-msg:hover .live-del {
  opacity: 1;
}
.live-del:hover {
  color: var(--red, #C0392B);
  border-color: var(--red, #C0392B);
}

/* ── Icon in live messages ───────────────────── */

.live-ico {
  font-size: 14px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   ADMIN PANEL — fixed bottom-right
══════════════════════════════════════════════ */

.its-live-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  border: 1px solid var(--teal, #1C3D34);
  background: var(--white, #fff);
}

/* ── Header ──────────────────────────────────── */

.ilp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--teal, #1C3D34);
  color: #fff;
}
.ilp-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.ilp-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: .7;
  transition: opacity .15s;
}
.ilp-toggle:hover {
  opacity: 1;
}

/* ── Body ────────────────────────────────────── */

.ilp-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Row ─────────────────────────────────────── */

.ilp-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ilp-row textarea {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--border, #C4C4C4);
  font-family: inherit;
  box-sizing: border-box;
}
.ilp-row textarea:focus {
  outline: none;
  border-color: var(--teal, #1C3D34);
}

/* ── Fields ──────────────────────────────────── */

.ilp-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ilp-field-grow {
  flex: 1;
}
.ilp-field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted, #6B6B6B);
}
.ilp-field input,
.ilp-field select {
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  border: 1px solid var(--border, #C4C4C4);
  background: var(--white, #fff);
  font-family: inherit;
  box-sizing: border-box;
}
.ilp-field input:focus,
.ilp-field select:focus {
  outline: none;
  border-color: var(--teal, #1C3D34);
}
#ilp-minute {
  width: 70px;
}

/* ── Quick buttons ───────────────────────────── */

.ilp-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ilp-qbtn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border, #C4C4C4);
  background: var(--white, #fff);
  color: var(--teal, #1C3D34);
  cursor: pointer;
  transition: all .15s;
}
.ilp-qbtn:hover {
  border-color: var(--teal, #1C3D34);
  background: var(--sage-lt, #D7EAE2);
}
.ilp-qbtn[data-type="try"]    { border-left: 3px solid var(--g-bright, #8ED968); }
.ilp-qbtn[data-type="kick"]   { border-left: 3px solid var(--g-bright, #8ED968); }
.ilp-qbtn[data-type="pen"]    { border-left: 3px solid var(--g-bright, #8ED968); }
.ilp-qbtn[data-type="yellow"] { border-left: 3px solid #F1C40F; }
.ilp-qbtn[data-type="red"]    { border-left: 3px solid var(--red, #C0392B); }
.ilp-qbtn[data-type="sub"]    { border-left: 3px solid #3498DB; }
.ilp-qbtn[data-type="inj"]    { border-left: 3px solid #E67E22; }

/* ── Actions ─────────────────────────────────── */

.ilp-actions {
  display: flex;
  gap: 8px;
}
.ilp-publish {
  flex: 1;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  background: var(--teal, #1C3D34);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.ilp-publish:hover {
  background: var(--teal-dk, #172713);
}
.ilp-publish:disabled {
  opacity: .5;
  cursor: wait;
}
.ilp-purge {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--red, #C0392B);
  color: var(--red, #C0392B);
  background: none;
  cursor: pointer;
  transition: all .15s;
}
.ilp-purge:hover {
  background: var(--red, #C0392B);
  color: #fff;
}

/* ── Status row ──────────────────────────────── */

.ilp-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #C4C4C4);
  flex-wrap: wrap;
}
.ilp-status-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #6B6B6B);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.ilp-status-row label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ilp-status-row input[type="radio"] {
  accent-color: var(--teal, #1C3D34);
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 480px) {
  .its-live-panel {
    width: calc(100vw - 16px);
    right: 8px;
    bottom: 8px;
  }
}
