/**
 * SPAA Membership Directory Styles
 */

/* Hide legacy Ignition Listee theme directory filter / search bar */
.form-filters,
form.form-filters,
.archive-listing-filter,
.listing-hero-search {
  display: none !important;
}

.spaa-directory {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #0f3e5f;
  font-family: inherit;
  color: #2d3748;
}

.spaa-directory__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.spaa-directory__header h2 {
  margin: 0;
  color: #0f3e5f;
  font-size: 1.75rem;
  font-weight: 700;
}

.spaa-directory__count {
  margin: 0;
  font-weight: 600;
  color: #4a5568;
  font-size: 1rem;
}

/* Filters */
.spaa-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: #f7fafc;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.spaa-filters label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2d3748;
}

.spaa-filters input,
.spaa-filters select {
  width: 100%;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  background: #fff;
  font-size: 0.95rem;
  color: #2d3748;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.spaa-filters input:focus,
.spaa-filters select:focus {
  outline: none;
  border-color: #0f3e5f;
  box-shadow: 0 0 0 3px rgba(15, 62, 95, 0.15);
}

.spaa-directory__status {
  min-height: 1.4rem;
  margin-bottom: 0.75rem;
  color: #718096;
  font-size: 0.9rem;
  font-style: italic;
}

/* Grid */
.spaa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  transition: opacity 140ms ease;
}

/* Member Card */
.spaa-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.spaa-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.spaa-card__media {
  position: relative;
  height: 180px;
  background: #f7fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #edf2f7;
  overflow: hidden;
  padding: 1rem;
}

.spaa-card__media img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 200ms ease;
}

.spaa-card:hover .spaa-card__media img {
  transform: scale(1.03);
}

.spaa-card__avatar-fallback {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f3e5f 0%, #1e699b 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.spaa-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.25rem;
  gap: 0.5rem;
}

.spaa-card__badge-wrapper {
  margin-bottom: 0.25rem;
}

.spaa-tier-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #e2e8f0;
  color: #4a5568;
}

.spaa-tier--arts-entrepreneur { background: #e0f2fe; color: #0369a1; }
.spaa-tier--emerging-artist { background: #fef3c7; color: #b45309; }
.spaa-tier--arts-partner { background: #dcfce7; color: #15803d; }
.spaa-tier--arts-supporter { background: #ede9fe; color: #6d28d9; }
.spaa-tier--arts-trailblazer { background: #fee2e2; color: #b91c1c; }
.spaa-tier--arts-advocate { background: #fce7f3; color: #be185d; }

.spaa-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.spaa-card__title a {
  color: #0f3e5f;
  text-decoration: none;
}

.spaa-card__title a:hover {
  color: #125175;
  text-decoration: underline;
}

.spaa-card__contact {
  margin: 0;
  font-size: 0.92rem;
  color: #4a5568;
}

.spaa-card__location {
  margin: 0;
  font-size: 0.85rem;
  color: #718096;
}

.spaa-card__desc {
  margin: 0.25rem 0 0 0;
  font-size: 0.88rem;
  color: #4a5568;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spaa-card__footer {
  margin-top: auto;
  padding-top: 1rem;
}

.spaa-card__button {
  display: inline-block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  padding: 0.55rem 1rem;
  background: #0f3e5f;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none !important;
  transition: background-color 150ms ease;
}

.spaa-card__button:hover {
  background: #14537d;
}

/* Actions Area */
.spaa-directory__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.spaa-directory__summary {
  margin: 0;
  color: #4a5568;
  font-size: 0.95rem;
  font-weight: 500;
}

.spaa-directory__buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.spaa-directory__button {
  border: 1px solid #0f3e5f;
  border-radius: 9999px;
  padding: 0.6rem 1.25rem;
  background: #0f3e5f;
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 140ms ease, opacity 140ms ease;
}

.spaa-directory__button:hover:not(:disabled) {
  background: #14537d;
}

.spaa-directory__button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.spaa-directory__button--secondary {
  background: #fff;
  color: #0f3e5f;
}

.spaa-directory__button--secondary:hover:not(:disabled) {
  background: #f7fafc;
}

.spaa-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  background: #f7fafc;
  border-radius: 8px;
  color: #718096;
  font-size: 1.1rem;
}

/* Universal box sizing for directory components */
.spaa-directory,
.spaa-directory *,
.spaa-directory *::before,
.spaa-directory *::after,
.spaa-member-detail,
.spaa-member-detail *,
.spaa-member-detail *::before,
.spaa-member-detail *::after {
  box-sizing: border-box;
}

/* Single Member Detail View */
.spaa-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.55rem 1.15rem;
  background: #f0f4f8;
  border: 1px solid #c9d7e3;
  color: #0f3e5f !important;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 140ms ease;
}

.spaa-back-link:hover {
  background: #0f3e5f;
  color: #fff !important;
  border-color: #0f3e5f;
}

.spaa-member-detail {
  font-family: inherit;
  color: #2d3748;
  max-width: 100%;
}

.spaa-detail-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(15, 62, 95, 0.05);
  margin-bottom: 2rem;
  overflow: hidden;
  max-width: 100%;
}

@media (max-width: 768px) {
  .spaa-detail-card {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

.spaa-detail-card__media {
  flex: 0 0 210px;
  width: 210px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
  .spaa-detail-card__media {
    flex: 0 0 auto;
    width: 180px;
    margin: 0 auto;
  }
}

.spaa-detail-card__media img {
  max-width: 100%;
  height: auto;
  max-height: 190px;
  object-fit: contain;
  display: block;
}

.spaa-detail-card__content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.spaa-detail-card__title {
  margin: 0.25rem 0 0 0;
  font-size: 1.85rem;
  line-height: 1.25;
  color: #0f3e5f;
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: break-word;
}

.spaa-detail-card__contact-name {
  margin: 0;
  font-size: 1.05rem;
  color: #4a5568;
  word-break: break-word;
}

.spaa-detail-card__meta-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid #edf2f7;
  font-size: 0.95rem;
  width: 100%;
  min-width: 0;
}

.spaa-detail-meta-item {
  display: grid;
  grid-template-columns: 85px 1fr;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
}

@media (max-width: 520px) {
  .spaa-detail-meta-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.spaa-detail-meta-label {
  font-weight: 700;
  color: #4a5568;
}

.spaa-detail-meta-value {
  color: #2d3748;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.spaa-detail-meta-value a {
  color: #0f3e5f;
  text-decoration: underline;
  overflow-wrap: break-word;
  word-break: break-word;
}

.spaa-detail-meta-value a:hover {
  color: #125175;
}

.spaa-social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.spaa-social-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f3e5f !important;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 140ms ease;
}

.spaa-social-btn:hover {
  background: #0f3e5f;
  color: #fff !important;
  border-color: #0f3e5f;
}

.spaa-detail-description {
  margin-top: 2rem;
  line-height: 1.7;
  font-size: 1.05rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.spaa-detail-description h3 {
  color: #0f3e5f;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 0.75rem;
}
