/*!
 * volunteer-verify.css
 * Public volunteer credential lookup page.
 * Design language consistent with status.css and developer-updates.css.
 */

/* The global * reset can break the UA stylesheet's [hidden] = display:none rule.
   Re-declare it here so state panels correctly hide on page load. */
[hidden] { display: none !important; }

/* ============================================================
   Layout
   ============================================================ */

.vv-main {
  padding-top: 70px;
  min-height: 100vh;
}

.vv-layout {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 7rem;
}

/* ============================================================
   Page header
   ============================================================ */

.vv-page-header {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vv-page-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.35px;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.vv-page-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  max-width: 500px;
}

/* ============================================================
   Search
   ============================================================ */

.vv-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.vv-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 1rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.vv-search-field:focus-within {
  border-color: rgba(180, 22, 22, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(180, 22, 22, 0.1);
}

.vv-search-prefix {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.25);
  user-select: none;
  margin-right: 0.2rem;
  line-height: 1;
}

.vv-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', monospace;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0.75rem 0;
}

.vv-search-input::placeholder {
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.12em;
  font-weight: 400;
}

.vv-search-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.125rem;
  height: 44px;
  background: #b41616;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.01em;
}

.vv-search-btn:hover:not(:disabled) {
  background: #c9191a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(180, 22, 22, 0.35);
}

.vv-search-btn:active {
  transform: translateY(1px) !important;
}

.vv-search-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================================================
   Result area — state panels
   ============================================================ */

/* Loading state */
.vv-state-loading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.vv-state-loading p {
  font-size: 0.875rem;
  color: #555;
}

.vv-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.07);
  border-top-color: #b41616;
  border-radius: 50%;
  animation: vv-spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* Error / not-found states */
.vv-state-error,
.vv-state-notfound {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid;
  font-size: 0.875rem;
  line-height: 1.55;
}

.vv-state-error {
  background: rgba(237, 66, 69, 0.06);
  border-color: rgba(237, 66, 69, 0.2);
  color: #ff6b6b;
}

.vv-state-notfound {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.07);
  color: #555;
}

.vv-state-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.8;
}

.vv-state-hint {
  display: block;
  font-size: 0.78rem;
  color: #3a3a3a;
  margin-top: 0.3rem;
}

/* ============================================================
   Credential panel — matches status page row pattern
   ============================================================ */

.vv-panel {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  overflow: hidden;
}

/* Status bar */
.vv-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.vv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.vv-pill-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.vv-panel[data-status="active"]   .vv-status-pill { background: rgba(52,211,153,0.07);  border-color: rgba(52,211,153,0.15);  color: #34d399; }
.vv-panel[data-status="expired"]  .vv-status-pill { background: rgba(251,191,36,0.07);  border-color: rgba(251,191,36,0.15);  color: #fbbf24; }
.vv-panel[data-status="revoked"]  .vv-status-pill { background: rgba(239,68,68,0.07);   border-color: rgba(239,68,68,0.15);   color: #f87171; }
.vv-panel[data-status="inactive"] .vv-status-pill { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.07); color: #444;    }

.vv-panel[data-status="active"] .vv-pill-dot {
  animation: vv-pulse 2.5s ease-in-out infinite;
}
@keyframes vv-pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }

.vv-status-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
}

/* Identity row */
.vv-identity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vv-avatar-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.vv-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.04);
}

.vv-avatar-fallback {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
}

.vv-avatar-fallback.hidden { display: none; }

.vv-identity-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.vv-display-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vv-credential-id {
  font-size: 0.72rem;
  color: #444;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.vv-discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.69rem;
  font-weight: 600;
  color: #5865f2;
  margin-top: 0.05rem;
}

/* Detail rows */
.vv-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 1.5rem;
  min-height: 3rem;
}

.vv-detail-row:last-of-type {
  border-bottom: none;
}

.vv-detail-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.vv-detail-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #bbb;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vv-detail-value--mono {
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.78rem;
  color: #666;
  letter-spacing: 0.02em;
}

/* Warning notice */
.vv-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.55;
  background: rgba(251, 191, 36, 0.04);
  border-top: 1px solid rgba(251, 191, 36, 0.1);
}

.vv-notice--revoked {
  background: rgba(239, 68, 68, 0.04);
  border-top-color: rgba(239, 68, 68, 0.12);
  color: #888;
}

.vv-notice svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #fbbf24;
}

.vv-notice--revoked svg {
  color: #f87171;
}

/* Discord prompt */
.vv-discord-prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.75rem;
  color: #3a3a3a;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vv-discord-prompt svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  opacity: 0.5;
}

/* ============================================================
   Bottom info
   ============================================================ */

.vv-info {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #333;
  line-height: 1.65;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 560px) {
  .vv-layout {
    padding: 2.5rem 1.25rem 5rem;
  }

  .vv-page-title {
    font-size: 1.75rem;
  }

  .vv-search-btn span {
    display: none;
  }

  .vv-search-btn {
    padding: 0 0.875rem;
  }

  .vv-detail-value--mono {
    font-size: 0.7rem;
  }
}

/* ============================================================
   Qualifications section
   ============================================================ */

.vv-quals-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.vv-quals-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.625rem;
}

.vv-quals-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.vv-qual-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: rgba(74,158,111,0.1);
  border: 1px solid rgba(74,158,111,0.22);
  border-radius: 6px;
}

.vv-qual-chip-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5fad80;
}

.vv-qual-chip-date {
  font-size: 0.67rem;
  color: rgba(95,173,128,0.65);
}
