/* ── Event List View ── */

#event-list-view {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: white;
}

#event-list-view-container {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.elv-layout {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1.25rem;
}

.elv-list-col {
  flex: 1;
  min-width: 0;
}

.elv-layout.reviews-on .elv-list-col {
  flex: 1;
  max-width: 50%;
}

.elv-reviews-panel {
  width: 50%;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.elv-reviews-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #eef2f7;
}

.elv-reviews-panel__header h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.1px;
  font-weight: 700;
  color: #111827;
}

.elv-reviews-panel__body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 4px;
}

.elv-reviews-context {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--ctx-r,64), var(--ctx-g,149), var(--ctx-b,246), 1);
  background: rgba(var(--ctx-r,64), var(--ctx-g,149), var(--ctx-b,246), 0.08);
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}
.elv-reviews-context__icon {
  color: rgba(var(--ctx-r,64), var(--ctx-g,149), var(--ctx-b,246), 1);
}
.elv-reviews-context__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.elv-reviews-context__title {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
}
.elv-reviews-context__date {
  font-size: 12px;
  color: #475569;
}

.elv-review-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.elv-review-form textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  resize: vertical;
}
.elv-review-form textarea:focus {
  outline: none;
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.elv-review-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.elv-review-form__count {
  font-size: 12px;
  color: #6b7280;
}

.elv-review-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.elv-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.elv-reviews-list--slide {
  animation: elv-slide-down 160ms ease;
}

@keyframes elv-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.elv-review-card__meta {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 13px;
  color: #6b7280;
}

.elv-review-card__author {
  font-weight: 700;
  color: #111827;
}

.elv-review-card__company {
  color: #4b5563;
}

.elv-review-card__text {
  font-size: 14px;
  color: #1f2937;
  white-space: pre-wrap;
  line-height: 1.45;
}

.elv-review-card__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.elv-review-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  color: #374151;
}
.elv-review-like:hover { border-color: #9ca3af; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.elv-review-like.is-active {
  background: #eef2ff;
  border-color: #4338ca;
  color: #312e81;
  box-shadow: 0 2px 8px rgba(67,56,202,0.16);
}

.elv-review-empty {
  text-align: center;
  color: #6b7280;
  padding: 1rem 0.5rem;
  font-size: 14px;
}

.elv-review-loading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.elv-review-skel {
  height: 68px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: elv-skel 1.1s ease infinite;
}

@keyframes elv-skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 699px) {
  .elv-layout { padding: 0 1rem 1rem; }
  .elv-layout.reviews-on .elv-list-col { max-width: none; }
  .elv-reviews-panel { display: none !important; }
}

/* ── Card ── */
.elv-card {
  display: flex;
  background: white;
  border-radius: 12px;
  border: 1px solid #e8eaed;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, opacity 0.15s, background 0.2s, border-color 0.2s;
  position: relative;
}
.elv-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.elv-card--past { opacity: 0.52; }
.elv-card--past:hover { opacity: 0.78; }

/* Attending state */
/* Attending state — background/border/text applied inline via JS */
.elv-card--attending .elv-card__title { font-weight: 700; }

/* ── Drag handle ── */
.elv-card__drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: #d1d5db;
  cursor: grab;
  transition: color 0.15s;
}
.elv-card__drag-handle:hover { color: #9ca3af; }
.elv-card__drag-handle:active { cursor: grabbing; }
.elv-list--manual .elv-card__drag-handle { display: flex; }
.elv-list--manual .elv-card { cursor: default; }

/* ── Color stripe ── */
.elv-card__stripe {
  width: 5px;
  flex-shrink: 0;
  background: var(--card-color, #4095f6);
}

/* ── Inner layout ── */
.elv-card__inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem 0.7rem;
  position: relative;
}

/* ── Header ── */
.elv-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.elv-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.elv-card__header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.elv-card__time {
  font-size: 0.73rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.elv-card__time--today {
  background: #dcfce7;
  color: #15803d;
  font-weight: 600;
}
.elv-card__past-badge {
  font-size: 0.7rem;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.elv-card__check {
  flex-shrink: 0;
  /* color applied inline */
}

/* ── Date ── */
.elv-card__date {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 0.45rem;
}

/* ── Pills ── */
.elv-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.elv-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.71rem;
  font-weight: 500;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}
.elv-pill--owner {
  background: #eff6ff;
  color: #1d4ed8;
}
.elv-pill--attending {
  font-weight: 600;
  /* color/bg applied inline */
}
.elv-pill--count {
  background: #f3f4f6;
  color: #6b7280;
}


/* ── Expand button ── */
.elv-card__expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: absolute;
  bottom: 0.6rem;
  right: 1rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
}
.elv-card__expand-btn:hover { color: #6b7280; }
.elv-card__chevron {
  transition: transform 0.25s ease;
}

/* ── Drawer ── */
.elv-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.elv-drawer__content {
  border-top: 1px solid #e8eaed;
  margin-top: 0.4rem;
  padding: 0.75rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.elv-card--attending .elv-drawer__content {
  border-top-color: var(--card-color);
  opacity: 0.4;
}
.elv-drawer__row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.4;
}
.elv-drawer__row--desc {
  align-items: flex-start;
}
.elv-drawer__row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #9ca3af;
}
.elv-drawer__flag-img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.elv-drawer__link {
  color: #4095f6;
  text-decoration: none;
  word-break: break-all;
  font-size: 0.8rem;
}
.elv-drawer__link:hover { text-decoration: underline; }
.elv-drawer__empty {
  font-size: 0.78rem;
  color: #9ca3af;
  font-style: italic;
}
.elv-drawer__actions {
  padding-top: 0.4rem;
  margin-top: 0.1rem;
}

/* ── Drag states ── */
.elv-card[draggable="true"] { cursor: grab; }
.elv-card--dragging { opacity: 0.35; cursor: grabbing; }
.elv-card--drag-over { border-color: #4095f6; box-shadow: 0 0 0 2px rgba(64,149,246,0.25); }

/* ── New card animation ── */
@keyframes elvCardIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.elv-card--new { animation: elvCardIn 0.3s ease both; }

/* ── Empty / Loading ── */
.elv-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  padding: 3rem 1rem;
}
.elv-loading { display: flex; flex-direction: column; gap: 0.75rem; }
.elv-skeleton-card {
  display: flex;
  background: white;
  border-radius: 12px;
  border: 1px solid #e8eaed;
  overflow: hidden;
  height: 80px;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}
.elv-skeleton-stripe { width: 5px; background: #e5e7eb; flex-shrink: 0; }
.elv-skeleton-body { padding: 0.85rem 1.1rem; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; }

/* Outline button for cancel attendance in drawer */
.button--outline {
  background-color: transparent;
  border: 1.5px solid #ef4444;
  border-radius: 999px;
  color: #ef4444;
  font-weight: 500;
}
.button--outline:hover {
  background-color: #fef2f2;
}
