﻿/*
 * ============================================================================
 * Copyright (c) 2025 ATH SOLUTIONS (PTY) LTD. All rights reserved.
 * KwaZulu-Natal, Republic of South Africa.
 * ============================================================================
 *
 * @BEGIN Developer Log Header Block
 * @FILENAME: cards.css
 * @TITLE: Wexford Lodge - Member Portal
 * @DESCRIPTION: Card component. Defines base card, data cards, member profile cards, event cards, KPI metric cards, and their hover/interactive states. All values from tokens.css.
 * @AUTHOR: Ary van der Pijl
 * @COMPANY: ATH SOLUTIONS (PTY) LTD
 * @WEBSITE: https://www.ath.solutions/
 * @EMAIL: info@ath.solutions
 * @COPYRIGHT: All Rights Reserved
 * @LICENSE: ATH SOLUTIONS - PROPRIETARY SOFTWARE LICENCE AGREEMENT (https://www.ath.solutions/documents/ath_solutions_software_licence_agreement.pdf)
 *
 * BEGIN CHANGELOG
 * @IMPORTANT NOTICE: Developers working on these files MUST update and maintain the Developers Change Log, failure to do is not an option:
 * !==================================================================================================================================================================
 * VERSION 1.0.0.3
 * - File Modified | Ary van der Pijl | 2026/07/16 | QA-070 | Added three new dashboard components: .degree-tracker (EA/FC/MM progress dots), .announcement-list, and .upcoming-list. Also updated .profile-hero::before's hardcoded rgba(184,134,11,*) glow to rgba(192,138,14,*), matching the refreshed --color-gold-700 value.
 * VERSION 1.0.0.2
 * - File Modified | Ary van der Pijl | 2026/06/19 | STANDARDS-COMPLIANCE | Applied ATH Solutions 2026 coding standards. |
 * VERSION 1.0.0.1
 * + File Created, Ary van der Pijl, 2026/06/13
 * ==================================================================================================================================================================!
 * END CHANGELOG
 */

/* ─────────────────────────────────────────────────────────────────────────
   BASE CARD
───────────────────────────────────────────────────────────────────────── */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card--constrained {
  max-width: 640px;
}

.card--interactive {
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Card sub-sections */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border-bottom: none;
  gap: var(--space-3);
}

.card-header__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: inherit;
  margin: 0;
}

.card-header__action {
  flex-shrink: 0;
}

.card-body {
  padding: var(--space-6);
}

.card-body--flush {
  padding: 0;
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* ─────────────────────────────────────────────────────────────────────────
   KPI CARD
───────────────────────────────────────────────────────────────────────── */

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-navy-50);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
}

.kpi-card__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: var(--line-height-none);
  margin-bottom: var(--space-1);
}

.kpi-card__label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-widest);
}

.kpi-card__trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  margin-top: var(--space-2);
}

.kpi-card__trend--up {
  color: var(--color-success);
}

.kpi-card__trend--down {
  color: var(--color-danger);
}

.kpi-card__trend--neutral {
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   MEMBER CARD
───────────────────────────────────────────────────────────────────────── */

.member-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.member-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.member-card--featured {
  border-left: 4px solid var(--color-accent);
}

.member-card__avatar {
  width: var(--avatar-lg);
  height: var(--avatar-lg);
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--color-border);
  flex-shrink: 0;
}

.member-card__avatar--initials {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
}

.member-card__info {
  flex: 1;
  min-width: 0;
}

.member-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-card__role {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ─────────────────────────────────────────────────────────────────────────
   EVENT CARD
───────────────────────────────────────────────────────────────────────── */

.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.event-card__header {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) 0;
}

.event-card__date-block {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  flex-shrink: 0;
  min-width: 52px;
}

.event-card__date-day {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-none);
  display: block;
}

.event-card__date-month {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  display: block;
}

.event-card__meta {
  flex: 1;
  min-width: 0;
}

.event-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.event-card__location {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.event-card__body {
  padding: var(--space-4) var(--space-5);
  flex: 1;
}

.event-card__footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─────────────────────────────────────────────────────────────────────────
   MEMBER PROFILE HERO
───────────────────────────────────────────────────────────────────────── */

.profile-hero {
  background: linear-gradient(135deg, var(--color-navy-700) 0%, var(--color-navy-800) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-8);
  margin-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(192, 138, 14, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.profile-hero__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.profile-hero__avatar {
  width: var(--avatar-xl);
  height: var(--avatar-xl);
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--color-accent);
  flex-shrink: 0;
}

.profile-hero__avatar--initials {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
}

.profile-hero__info {
  flex: 1;
  min-width: 0;
}

.profile-hero__name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-on-primary);
  margin-bottom: var(--space-2);
}

.profile-hero__title {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-3);
}

.profile-hero__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────────────────
   DEGREE TRACKER (dashboard)
───────────────────────────────────────────────────────────────────────── */

.degree-tracker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.degree-tracker::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 17%;
  right: 17%;
  height: 2px;
  background: var(--color-border-strong);
  z-index: 0;
}

.degree-tracker__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.degree-tracker__dot {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--text-lg);
  background: var(--color-surface);
  border: 2px solid var(--color-border-strong);
  color: var(--color-text-muted);
}

.degree-tracker__stage--completed .degree-tracker__dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-on-accent);
}

.degree-tracker__stage--current .degree-tracker__dot {
  background: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

.degree-tracker__name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-top: var(--space-2);
}

.degree-tracker__status {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────
   ANNOUNCEMENT LIST (dashboard)
───────────────────────────────────────────────────────────────────────── */

.announcement-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.announcement-list__item {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.announcement-list__item:last-child {
  border-bottom: none;
}

.announcement-list__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.announcement-list__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.announcement-list__date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.announcement-list__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: var(--space-1) 0 0;
  line-height: var(--line-height-relaxed);
}

/* ─────────────────────────────────────────────────────────────────────────
   UPCOMING LIST (dashboard)
───────────────────────────────────────────────────────────────────────── */

.upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.upcoming-list__item {
  border-bottom: 1px solid var(--color-border);
}

.upcoming-list__item:last-child {
  border-bottom: none;
}

.upcoming-list__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-6);
  color: inherit;
  text-decoration: none;
}

.upcoming-list__link:hover {
  background: var(--color-surface-2);
  text-decoration: none;
}

.upcoming-list__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

.upcoming-list__date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}