/* ===== TIER MEMBERSHIP SECTION STYLES ===== */
/* Clean, organized styles for the tier membership system */

.tier-membership-section {
  background: var(--map-surface);
}

/* ===== TIER BADGE DISPLAY (Top Section - Visual Only) ===== */

.tier-badge-display {
  max-width: 1000px;
  margin: 0 auto 3rem;
}

.tier-badge-card {
  text-align: center;
  transition: all 0.2s ease;
}

.tier-badge-card:hover {
  transform: translateY(-4px);
}

.tier-badge-display-icon {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.tier-badge-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.tier-badge-price {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0;
  margin-top: 0.5rem;
  opacity: 0.85;
  color: var(--map-text) !important; /* Override text-white class, theme-aware */
}

/* Badge styling fixes */
.tier-badge-card .badge {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Silver badge text contrast fix */
.badge.bg-silver {
  color: #000 !important; /* Black text on silver gray background for readability */
}

:root[data-bs-theme="dark"] .badge.bg-silver {
  color: #000 !important; /* Keep black in dark mode - better contrast than white */
}

/* ===== TIER SELECTORS (Interactive Buttons - Desktop Sidebar) ===== */

.tier-selectors {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.tier-selector {
  all: unset;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  background: var(--map-surface-alt);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  width: 100%; /* Force full width */
}

.tier-selector:hover {
  background: var(--bs-secondary-bg);
  border-color: color-mix(in srgb, var(--map-text) 12%, transparent);
  transform: translateX(4px);
}

.tier-selector.active {
  background: var(--bs-body-bg);
  border-color: var(--tier-color, var(--map-color-brand));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--tier-color, var(--map-color-brand)) 20%, transparent);
}

.tier-selector-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.tier-selector-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  flex: 1;
}

/* ===== MEMBER GRID CONTAINER ===== */

.member-grid-container {
  background: transparent;
  border-radius: 0.75rem;
  padding: 2rem;
  min-height: 450px;
  box-sizing: border-box;
}

.member-grid-status {
  margin-bottom: 2rem;
}

.member-grid-status h5 {
  color: var(--map-text);
  font-family: var(--font-body);
  font-weight: 600;
}

/* ===== MEMBER GRID ===== */

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  transition: opacity 0.3s ease;
}

/* Standard tiers (Gold/Silver): 4 columns */
.member-grid:not(.premium-tier) {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== MEMBER SLOTS ===== */

.member-slot {
  aspect-ratio: 3/2;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
}

/* Available slots - NO BORDER/BACKGROUND */
.member-slot.available {
  background: transparent;
  border: none;
  padding: 1.5rem 1rem;
  overflow: visible;
}

/* Filled slots with logos */
.member-slot.filled {
  border: 2px solid var(--map-color-brand);
  background: var(--bs-body-bg);
  padding: 1rem;
  overflow: hidden;
  position: relative;
}

.member-slot.filled:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--map-color-brand) 25%, transparent);
}

/* All slots display equally - no reserved status */

.member-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: var(--logo-filter, none);
  position: relative;
  z-index: 1;
}

/* ===== SLOT PLACEHOLDERS (Available Slots) ===== */

.slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  width: 100%;
  height: 100%;
}

.slot-badge {
  width: 60px;
  height: 60px;
  object-fit: contain;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.member-slot.available:hover .slot-badge {
  opacity: 0.8;
}

.slot-text {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: var(--map-text);
  opacity: 0.7;
  margin: 0;
  flex-shrink: 0;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

/* ===== TIER-SPECIFIC COLORS ===== */

.member-slot[data-tier="cornerstone"].filled {
  border-color: var(--map-red-600);
}

.member-slot[data-tier="platinum"].filled {
  border-color: var(--map-blue-600);
}

.member-slot[data-tier="gold"].filled {
  border-color: var(--map-gold-600);
}

.member-slot[data-tier="silver"].filled {
  border-color: var(--map-silver-600);
}

/* ===== QUOTE DISPLAY ===== */

.tier-quote-container,
.tier-quote-mobile {
  background: var(--map-surface-alt);
  border-radius: 0.75rem;
  padding: 2rem;
  min-height: 300px;
  box-sizing: border-box;
  transition: opacity 0.3s ease;
}

.tier-quote-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quote-icon {
  text-align: center;
}

.tier-quote-text {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--map-text);
  opacity: 0.95;
  margin: 0 0 1.5rem 0;
  flex: 1;
}

.tier-quote-author {
  border-top: 2px solid color-mix(in srgb, var(--map-text) 15%, transparent);
  padding-top: 1.25rem;
}

.author-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--map-text);
  margin-bottom: 0.25rem;
}

.author-company {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--map-text);
  opacity: 0.7;
}

/* Mobile quote styling */
.tier-quote-mobile {
  min-height: auto;
  padding: 1.5rem;
}

.tier-quote-mobile .tier-quote-text {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.tier-quote-mobile .quote-icon {
  margin-bottom: 0.75rem;
}

.tier-quote-mobile .quote-icon .material-icons {
  font-size: 2.5rem !important;
}

/* ===== DARK MODE LOGO FILTER - DISABLED (always show light logos as-is) ===== */

/* No logo filtering in dark mode - light logos always visible */

/* ===== TABLET/MOBILE RESPONSIVE (max-width: 991.98px) ===== */

@media (max-width: 991.98px) {
  /* Horizontal scrollable selectors */
  .tier-selectors {
    flex-direction: row;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
  }
  
  .tier-selector {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 0.875rem 1rem;
  }
  
  .tier-selector:hover {
    transform: translateY(-2px);
  }
  
  .tier-selector-icon {
    width: 48px;
    height: 48px;
  }
  
  .tier-selector-name {
    font-size: 0.9rem;
  }
  
  /* Badge display */
  .tier-badge-display-icon {
    width: 90px;
    height: 90px;
  }
  
  .tier-badge-name {
    font-size: 1rem;
  }
  
  .tier-badge-price {
    font-size: 0.875rem;
  }
  
  /* Grid: 3 columns on tablet */
  .member-grid,
  .member-grid:not(.premium-tier) {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem 1.25rem;
  }
  
  .member-grid-container {
    padding: 1.75rem;
  }
  
  .member-slot.available {
    padding: 0.875rem;
  }
  
  .member-slot.filled {
    padding: 0.875rem;
  }
  
  /* Quote adjustments for tablet */
  .tier-quote-container {
    padding: 1.75rem;
  }
  
  .tier-quote-text {
    font-size: 1rem;
  }
}

/* ===== MOBILE RESPONSIVE (max-width: 575.98px) ===== */

@media (max-width: 575.98px) {
  /* Badge-only selectors (no text) */
  .tier-selector {
    padding: 0.75rem 0.5rem;
    min-width: auto;
  }
  
  .tier-selector-icon {
    width: 44px;
    height: 44px;
  }
  
  .tier-selector-name {
    display: none;
  }
  
  /* Badge display */
  .tier-badge-display-icon {
    width: 70px;
    height: 70px;
  }
  
  .tier-badge-name {
    font-size: 0.95rem;
  }
  
  .tier-badge-price {
    font-size: 0.8rem;
  }
  
  /* Grid: 2 columns on mobile */
  .member-grid,
  .member-grid:not(.premium-tier) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  
  .member-grid-container {
    padding: 1.25rem;
  }
  
  .member-slot.available {
    padding: 0.75rem;
  }
  
  .member-slot.filled {
    padding: 0.75rem;
  }
  
  .slot-badge {
    width: 44px;
    height: 44px;
  }
  
  .slot-text {
    font-size: 0.65rem;
  }
}

/* ===== TIER TESTIMONIAL DISPLAY ===== */

.tier-testimonial-container,
.tier-quote-mobile {
  background: var(--map-surface-alt);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.3s ease;
}

/* Mobile testimonial adjustments */
.tier-quote-mobile {
  min-height: 300px;
  padding: 1.5rem;
}

.testimonial-content {
  text-align: center;
}

/* Company logo in testimonial */
.testimonial-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.company-logo-display {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(0%);
  opacity: 1;
}

/* Testimonial with quote */
.testimonial-content.with-quote .company-logo-display {
  max-height: 60px;
}

.testimonial-quote {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--map-text);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  margin-top: 1rem;
}

.author-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--map-text);
}

.author-title {
  font-size: 0.9rem;
  color: var(--map-text-subtle);
}

/* Empty slot or no testimonial message */
.testimonial-content.empty-slot,
.testimonial-content.no-quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.testimonial-badge {
  margin-bottom: 1.5rem;
}

.testimonial-badge-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  opacity: 0.7;
}

.testimonial-message {
  max-width: 280px;
  margin: 0 auto;
}

.testimonial-message p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--map-text-subtle);
}

/* Active member slot highlight */
.member-slot.filled.active {
  border-color: var(--map-accent);
  box-shadow: 0 0 0 3px rgba(235, 0, 41, 0.2);
}

:root[data-bs-theme="dark"] .member-slot.filled.active {
  box-shadow: 0 0 0 3px rgba(235, 0, 41, 0.3);
}

/* Clickable member slot visual feedback */
.member-slot.filled {
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-slot.filled:hover {
  border-color: var(--map-accent-subtle);
  transform: translateY(-2px);
}

.member-slot.filled:focus {
  outline: 2px solid var(--map-accent);
  outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  .tier-selector,
  .tier-badge-card,
  .member-slot,
  .member-grid,
  .tier-testimonial-container {
    transition: none !important;
  }
  
  .tier-selector:hover,
  .tier-badge-card:hover,
  .member-slot.filled:hover {
    transform: none !important;
  }
}

/* ===== DARK MODE FIX: Light Gray Background for Logo Visibility ===== */
/* Temporary fix until dark theme partner logos are created */

:root[data-bs-theme="dark"] .member-grid-container {
  background: #e5e5e5; /* Light gray background */
  border-radius: 0.75rem;
  padding: 1.5rem;
}

:root[data-bs-theme="dark"] .member-grid-status {
  color: #212529 !important; /* Dark text on light background */
}

:root[data-bs-theme="dark"] .member-grid-status h5,
:root[data-bs-theme="dark"] .member-grid-status .tier-name-display {
  color: #212529 !important;
}

:root[data-bs-theme="dark"] .member-slot {
  background: #ffffff; /* White background for logo slots */
  border-color: rgba(33, 37, 41, 0.15) !important;
}

:root[data-bs-theme="dark"] .member-slot.available .slot-text {
  color: #212529;
  opacity: 0.6;
}

:root[data-bs-theme="dark"] .member-slot.filled {
  border-width: 2px;
}

/* Keep tier-specific border colors in dark mode */
:root[data-bs-theme="dark"] .member-slot[data-tier="cornerstone"].filled {
  border-color: var(--map-red-600) !important;
}

:root[data-bs-theme="dark"] .member-slot[data-tier="platinum"].filled {
  border-color: var(--map-blue-600) !important;
}

:root[data-bs-theme="dark"] .member-slot[data-tier="gold"].filled {
  border-color: var(--map-gold-600) !important;
}

:root[data-bs-theme="dark"] .member-slot[data-tier="silver"].filled {
  border-color: var(--map-silver-600) !important;
}
