/**
 * Sim Racing Nation & Grid Geeks — Featured Members Directory Styles
 * Traktion Design System Compliance
 */

/* ==========================================================================
   Featured Members Header & Directory Controls
   ========================================================================== */
.featured-main-section {
  padding: 36px 0 80px;
}

.featured-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.featured-header-text {
  flex: 1;
  min-width: 280px;
}

.featured-page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.featured-page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 680px;
}

.featured-header-action {
  flex-shrink: 0;
}

.featured-header-action .btn-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--srn-red);
  color: #FFFFFF !important;
  font-size: 0.875rem;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(211, 34, 42, 0.25);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.featured-header-action .btn-action-primary:hover {
  background-color: var(--srn-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(211, 34, 42, 0.35);
}

@media (max-width: 640px) {
  .featured-main-section {
    padding: 24px 0 60px;
  }
  .featured-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .featured-header-action {
    width: 100%;
  }
  .featured-header-action .btn-action-primary {
    width: 100%;
    padding: 12px 20px;
  }
}

/* ==========================================================================
   Filter & Search Controls Bar (Stacked Search Above Two Dropdowns)
   ========================================================================== */
.member-controls-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin-bottom: 36px;
}

.member-search-top-row {
  margin-bottom: 16px;
  width: 100%;
}

.member-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.member-search-bar svg {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.member-search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-size: 0.9375rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: inherit;
  transition: all var(--transition-fast);
}

.member-search-bar input:focus {
  outline: none;
  border-color: var(--srn-red);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(211, 34, 42, 0.12);
}

.member-dropdowns-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.member-dropdown-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 250px;
}

.member-dropdown-label {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.member-select-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.member-dropdown-select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.member-dropdown-select:focus {
  outline: none;
  border-color: var(--srn-red);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(211, 34, 42, 0.12);
}

.dropdown-chevron {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .member-dropdowns-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .member-dropdown-group {
    width: 100%;
    min-width: 0;
  }
}

.member-count-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Member Profile Cards Grid
   ========================================================================== */
.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 1024px) {
  .member-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .member-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.member-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, box-shadow;
}

.member-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: #CBD5E1;
}

.member-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0F172A;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.member-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.member-card:hover .member-card-img {
  transform: scale(1.04);
}

.member-card-cat-badge,
.member-card-date-badge {
  display: none !important;
}

.member-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.member-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.member-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.member-card-location-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.member-card-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.member-card-location svg {
  color: var(--srn-red);
  flex-shrink: 0;
}

.member-card-headline {
  display: none !important;
}

.member-card-summary {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 18px 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.member-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.btn-view-member {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-view-member:hover {
  background: var(--srn-red);
  border-color: var(--srn-red);
  color: #FFFFFF;
}

.btn-view-member:hover svg {
  transform: translateX(3px);
}

.btn-view-member svg {
  transition: transform var(--transition-fast);
}

/* Empty State */
.members-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-light);
}

.members-empty-state svg {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.members-empty-state h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.members-empty-state p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
  font-size: 0.9375rem;
}

/* ==========================================================================
   Slide-Over Profile Drawer Details
   ========================================================================== */
.drawer-hero-banner {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.drawer-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.drawer-cat-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(211, 34, 42, 0.1);
  color: var(--srn-red);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.drawer-date-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.drawer-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.drawer-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 8px 0;
}

.drawer-location svg {
  color: var(--srn-red);
}

.drawer-headline {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--srn-red);
  line-height: 1.4;
  margin: 0 0 16px 0;
}

.btn-dossier-link,
.btn-partner-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-dossier-link {
  background: var(--srn-red);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(211, 34, 42, 0.25);
}

.btn-dossier-link:hover {
  background: var(--srn-red-dark);
  transform: translateY(-1px);
}

.btn-partner-link {
  background: #0091FF;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 145, 255, 0.25);
}

.btn-partner-link:hover {
  background: #0077D6;
  transform: translateY(-1px);
}

.btn-article-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 800;
  text-decoration: none;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-article-link:hover {
  background: rgba(211, 34, 42, 0.12);
  border-color: var(--srn-red);
  color: var(--srn-red);
  transform: translateY(-1px);
}

.drawer-section {
  margin-top: 24px;
}

.drawer-section-heading {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

.drawer-summary-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-main);
  margin: 0;
}

.drawer-quote {
  margin: 16px 0 0 0;
  padding: 12px 16px;
  background: #F8FAFC;
  border-left: 3px solid var(--srn-red);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 0.875rem;
  color: #334155;
}

.drawer-quote p {
  margin: 0;
}

/* Stats Cards inside Drawer */
.drawer-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-stat-card {
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.drawer-stat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.drawer-stat-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(211, 34, 42, 0.1);
  color: var(--srn-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-stat-icon svg {
  width: 14px;
  height: 14px;
}

.drawer-stat-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.drawer-stat-val {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0;
}

.drawer-socials-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.drawer-social-pill:hover {
  background: var(--srn-red);
  color: #FFFFFF;
  border-color: var(--srn-red);
}

.btn-drawer-apply {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--bg-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-drawer-apply:hover {
  background: #E2E8F0;
}

.btn-drawer-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: #5865F2;
  color: #FFFFFF;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-drawer-discord:hover {
  background: #4752C4;
}

/* ==========================================================================
   "Be Featured" Custom Interview Form
   ========================================================================== */
.featured-form-section {
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
  padding: 80px 0;
}

.interview-form-wrapper {
  max-width: 820px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  padding: 40px;
}

@media (max-width: 640px) {
  .interview-form-wrapper {
    padding: 24px 18px;
  }
}

.form-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.btn-open-gform-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-open-gform-link:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Photo Dropzone (Direct Drive) */
.photo-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 6px;
}

.photo-dropzone:hover,
.photo-dropzone.dragover {
  border-color: var(--srn-red);
  background: rgba(211, 34, 42, 0.03);
}

.photo-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(211, 34, 42, 0.1);
  color: var(--srn-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.photo-dropzone-text {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.photo-dropzone-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* Photo Previews */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.photo-preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #000;
  aspect-ratio: 16 / 10;
}

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

.photo-preview-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 6px;
  font-size: 0.6875rem;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
}

.photo-preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-preview-size {
  opacity: 0.7;
  font-size: 0.625rem;
}

.btn-remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(211, 34, 42, 0.9);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.btn-remove-photo svg {
  width: 12px;
  height: 12px;
}

/* Newsletter Opt-in Box */
.newsletter-optin-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  margin-top: 24px;
  cursor: pointer;
  user-select: none;
}

.newsletter-optin-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--srn-red);
  cursor: pointer;
  flex-shrink: 0;
}

.newsletter-optin-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.newsletter-optin-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-main);
}

.newsletter-optin-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Submit Button & Spinner */
.btn-submit-interview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  background: var(--srn-red);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(211, 34, 42, 0.35);
  transition: all var(--transition-fast);
  margin-top: 28px;
}

.btn-submit-interview:hover {
  background: var(--srn-red-dark);
  transform: translateY(-1px);
}

.btn-submit-interview:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  animation: spin 0.9s linear infinite;
}

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

/* ==========================================================================
   Google Form Fallback Modal
   ========================================================================== */
.gform-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gform-modal-backdrop.active {
  display: flex;
}

.gform-modal-container {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.gform-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #F8FAFC;
}

.gform-modal-header h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.btn-modal-close:hover {
  background: #E2E8F0;
  color: var(--text-main);
}

.gform-modal-body {
  flex-grow: 1;
  overflow-y: auto;
}

.gform-modal-body iframe {
  width: 100%;
  height: 700px;
  border: none;
  display: block;
}
