/* ══════════════════════════════════════════════
   CONNEK Phase 4 — VClean Civic Module Styles
══════════════════════════════════════════════ */

/* ── Tab header ── */
.vclean-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.vclean-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vclean-title-icon {
  width: 30px;
  height: 30px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.vclean-submit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.vclean-submit-btn:active { opacity: 0.8; }

/* ── Feed ── */
.vclean-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px 120px;
}

.vclean-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 48px 24px;
  line-height: 1.6;
}

/* ── Validation Card ── */
.vclean-card {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 16px;
  overflow: hidden;
  animation: fadeIn 0.3s ease both;
}

.vclean-card.validated {
  opacity: 0.5;
  pointer-events: none;
}

/* Before / After photo pair */
.vclean-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  height: 180px;
}

.vclean-photo-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface-bg, rgba(255,255,255,0.06));
}

.vclean-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vclean-photo-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.55);
  border-radius: 6px;
  padding: 2px 7px;
}

.vclean-photo-label.after {
  background: rgba(0, 200, 120, 0.75);
}

/* Card body */
.vclean-card-body {
  padding: 12px 14px 14px;
}

.vclean-caption {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Vote progress bar */
.vclean-progress-wrap {
  margin-bottom: 12px;
}

.vclean-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.vclean-progress-label span:last-child {
  font-weight: 700;
  color: var(--accent-primary);
}

.vclean-progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.vclean-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #00e676);
  border-radius: 9999px;
  transition: width 0.4s ease;
  min-width: 0;
}

/* Vote buttons */
.vclean-vote-row {
  display: flex;
  gap: 10px;
}

.vclean-vote-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 10px;
  padding: 9px 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.vclean-vote-btn:hover {
  background: rgba(255,255,255,0.06);
}

.vclean-vote-btn.upvote.voted,
.vclean-vote-btn.upvote:active {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.4);
  color: #00e676;
}

.vclean-vote-btn.downvote.voted,
.vclean-vote-btn.downvote:active {
  background: rgba(255, 82, 82, 0.1);
  border-color: rgba(255, 82, 82, 0.35);
  color: #ff5252;
}

.vclean-vote-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Validated badge overlay */
.vclean-validated-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: rgba(0, 230, 118, 0.1);
  border-top: 1px solid rgba(0, 230, 118, 0.2);
  color: #00e676;
  font-size: 0.82rem;
  font-weight: 700;
}

/* ── Submit modal sheet ── */
.vclean-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.vclean-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.vclean-modal-sheet {
  background: var(--surface-bg, #1a1a2e);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px 20px 40px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.vclean-modal-overlay.open .vclean-modal-sheet {
  transform: translateY(0);
}

.vclean-modal-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 9999px;
  margin: 0 auto 16px;
}

.vclean-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

/* Photo upload slots */
.vclean-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.vclean-upload-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--border-color, rgba(255,255,255,0.15));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}

.vclean-upload-slot.has-image {
  border-style: solid;
  border-color: var(--accent-primary);
}

.vclean-upload-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vclean-upload-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.vclean-slot-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  z-index: 1;
  pointer-events: none;
}

.vclean-slot-icon {
  font-size: 1.6rem;
  z-index: 1;
  pointer-events: none;
}

.vclean-caption-field {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  resize: none;
  font-family: inherit;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.vclean-caption-field::placeholder { color: var(--text-muted); }
.vclean-caption-field:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.vclean-submit-confirm-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vclean-submit-confirm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vclean-submit-confirm-btn:active   { opacity: 0.8; }

.vclean-submit-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.vclean-submit-confirm-btn.loading .vclean-submit-spinner { display: block; }
.vclean-submit-confirm-btn.loading .vclean-submit-text    { display: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Live dot pulse on incoming events ── */
.vclean-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00e676;
  animation: pulse 1.6s infinite;
  display: inline-block;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,230,118,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(0,230,118,0); }
}
