/* my.css -- Phase 3 branch portal (/my/*) additive styles ONLY.
   Reuses style.css's existing CSS custom properties (--primary, --muted,
   --border, --bg, --card, etc.) so it matches the rest of the app; only
   adds what style.css doesn't already provide: status badges, a claims-list
   layout, detail-view label/value rows, and an .alert-success variant
   (style.css only has .alert-danger). Loaded exclusively by
   templates/my/*.html via base_portal.html's {% block extra_head %} -- no
   other template (claim_form.html, staff_login.html, etc.) references this
   file, and style.css itself is untouched. */

/* ── Centered login/change-password card. .login-wrapper's min-height:100vh
   would fight the portal header base_portal.html already renders above the
   content block, so this is a lighter variant that just centers the card
   within .page-content instead of claiming the full viewport. ──────────── */
.my-center-wrap {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.my-login-hint {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Action bar (claims list page) ────────────────────────────────────── */
.my-actions-bar {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.my-action-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
}

.my-back-link {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.my-back-link:hover {
  text-decoration: underline;
}

/* ── Claims list ───────────────────────────────────────────────────────── */
.claim-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  text-decoration: none;
  color: var(--text);
}

.claim-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.claim-row-main {
  min-width: 0;
}

.claim-row-item {
  font-weight: 700;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claim-row-meta {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claim-row-side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.claim-row-arrow {
  color: var(--muted);
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1rem;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* ── Status badge (shared: list rows + detail page) ───────────────────── */
.status-badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge--pending {
  background: #fef9c3;
  color: #854d0e;
}

.status-badge--progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge--success {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.status-badge--closed {
  background: #e2e8f0;
  color: var(--muted);
}

/* ── Outcome banner (detail page, terminal statuses only) ─────────────── */
.outcome-banner {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.outcome-banner--success {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.outcome-banner--closed {
  background: #e2e8f0;
  color: var(--text);
}

.outcome-banner--pending,
.outcome-banner--progress {
  background: var(--bg);
  color: var(--text);
}

/* ── Detail view label/value rows ─────────────────────────────────────── */
.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Attachments ───────────────────────────────────────────────────────── */
.attachment-group {
  margin-bottom: 0.85rem;
}

.attachment-group:last-child {
  margin-bottom: 0;
}

.attachment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.attachment-link {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--primary-dark);
  text-decoration: none;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-link:hover {
  background: var(--primary-light);
}

/* ── Alert success variant (style.css only defines .alert-danger) ─────── */
.alert-success {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #86efac;
}
