/* ============================================================
   Elita 9 Popup — Stilovi
   Verzija: 1.0
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────── */
.e9-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  animation: e9FadeIn 0.22s ease;
}

.e9-overlay.e9-closing {
  animation: e9FadeOut 0.22s ease forwards;
}

@keyframes e9FadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes e9FadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Card ─────────────────────────────────────────────── */
.e9-card {
  background: #fff;
  border-radius: 18px;
  max-width: 430px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: e9SlideUp 0.28s cubic-bezier(0.34,1.42,0.64,1);
}

@keyframes e9SlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ───────────────────────────────────────────── */
.e9-header {
  background: #501313;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px 18px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid rgba(212,175,55,0.35);
}

.e9-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: rgba(255,255,255,0.14);
  border: none;
  color: rgba(255,255,255,0.85);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.e9-close:hover { background: rgba(255,255,255,0.26); }

.e9-trophy { font-size: 30px; margin-bottom: 6px; }

.e9-eyebrow {
  color: rgba(240,160,160,0.85);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: inherit;
}

.e9-title-small {
  color: #fafafa;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 1px;
}

.e9-title-big {
  color: #FAC775;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

/* ── Body ─────────────────────────────────────────────── */
.e9-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.e9-sub {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.6;
}

/* ── Search ───────────────────────────────────────────── */
.e9-search-wrap {
  position: relative;
  margin-bottom: 8px;
}

.e9-search-wrap::before {
  content: "🔍";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
}

.e9-search {
  padding-left: 32px !important;
}

/* ── Input ────────────────────────────────────────────── */
.e9-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: #222;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.e9-input:focus { border-color: #A32D2D; }

.e9-email { margin-bottom: 12px; }

/* ── Contestants list ─────────────────────────────────── */
.e9-list {
  max-height: 195px;
  overflow-y: auto;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  margin-bottom: 14px;
  background: #fafafa;
}

.e9-row {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13.5px;
  color: #333;
  transition: background 0.1s;
  box-sizing: border-box;
}

.e9-row:last-child { border-bottom: none; }
.e9-row:hover { background: #f5f5f5; }

.e9-row.e9-sel {
  background: #fff0f0;
  border-left-color: #A32D2D;
  color: #7a1414;
  font-weight: 600;
}

.e9-row input[type="radio"] {
  margin-right: 10px;
  accent-color: #A32D2D;
  flex-shrink: 0;
  cursor: pointer;
}

.e9-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

/* ── Newsletter ───────────────────────────────────────── */
.e9-newsletter {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 11px 12px;
  background: #fffbf0;
  border-radius: 9px;
  border: 1px solid rgba(212,175,55,0.3);
  margin-bottom: 14px;
}

.e9-newsletter input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #A32D2D;
  cursor: pointer;
}

.e9-newsletter span {
  font-size: 12.5px;
  color: #5a4f00;
  line-height: 1.6;
}

/* ── Error ────────────────────────────────────────────── */
.e9-error {
  padding: 9px 12px;
  background: #fff0f0;
  color: #c0392b;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid rgba(192,57,43,0.2);
}

/* ── Submit button ────────────────────────────────────── */
.e9-submit {
  width: 100%;
  padding: 13px;
  background: #A32D2D;
  color: #f7c1c1;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}

.e9-submit:hover:not(:disabled) { background: #8B0000; }
.e9-submit:disabled { background: #ccc; color: #999; cursor: default; }

/* ── GDPR note ────────────────────────────────────────── */
.e9-gdpr {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.5;
}

/* ── Done step ────────────────────────────────────────── */
.e9-done { text-align: center; }
.e9-done-icon { font-size: 44px; margin-bottom: 8px; }

.e9-done-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
}

.e9-my-vote {
  display: inline-flex;
  padding: 5px 14px;
  background: #fff0f0;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(192,57,43,0.2);
  font-size: 12.5px;
  color: #791f1f;
}

.e9-results-label {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.e9-results { text-align: left; margin-bottom: 16px; }

.e9-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 4px;
}

.e9-result-label {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.e9-rank {
  font-size: 11px;
  font-weight: 600;
  min-width: 16px;
  color: #999;
  flex-shrink: 0;
}

.e9-result-me { font-weight: 700; color: #791f1f; }

.e9-my-badge {
  font-size: 10px;
  background: #fff0f0;
  color: #A32D2D;
  padding: 1px 7px;
  border-radius: 8px;
  border: 1px solid rgba(163,45,45,0.25);
  flex-shrink: 0;
}

.e9-pct {
  font-weight: 700;
  font-size: 12.5px;
  flex-shrink: 0;
  margin-left: 10px;
}

.e9-bar-track {
  background: #f0f0f0;
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
  margin-bottom: 9px;
}

.e9-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.75s ease;
  width: 0%;
}

.e9-no-votes { color: #aaa; font-size: 13px; }

.e9-close-btn {
  padding: 11px 32px;
  background: #A32D2D;
  color: #f7c1c1;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.e9-close-btn:hover { background: #8B0000; }

/* ── Inline widget (mid-article) ──────────────────────── */
.e9-inline-widget {
  margin: 24px 0;
}

.e9-iw-inner {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 20px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.e9-iw-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
}

.e9-iw-sub {
  font-size: 12px;
  color: #888;
}

.e9-iw-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.e9-open-btn {
  padding: 9px 18px;
  background: #A32D2D;
  color: #f7c1c1;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.e9-open-btn:hover { background: #8B0000; }

.e9-ghost-btn {
  padding: 8px 14px;
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.e9-ghost-btn:hover { background: #f0f0f0; }

.e9-voted-badge {
  font-size: 12px;
  color: #27ae60;
}

/* ── Scrollbar styling ────────────────────────────────── */
.e9-list::-webkit-scrollbar,
.e9-body::-webkit-scrollbar { width: 4px; }

.e9-list::-webkit-scrollbar-track,
.e9-body::-webkit-scrollbar-track { background: transparent; }

.e9-list::-webkit-scrollbar-thumb,
.e9-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .e9-card { border-radius: 14px 14px 0 0; }
  .e9-overlay { align-items: flex-end; padding: 0; }
  .e9-title-big { font-size: 24px; }
}
