/* ===========================================
   Filter Prism - Horizontal Row Design
   Desktop: Single row | Mobile: 2x2 Grid
   =========================================== */

/* Container - Pill shape */
.filter-prism-container {
  position: relative;
  padding: 2px;
  background: #F7F7F7; /* Apple/Airbnb style subtle off-white */
  border-radius: 9999px;
  border: 1px solid #E5E5E5; /* Very subtle border */
  margin: 12px auto;
  max-width: 1100px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.02); /* Minimal inset shadow */
}

/* Background blobs - Adjusted for solid background */
.filter-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.filter-blob-pink {
  top: 50%;
  left: 20%;
  transform: translateY(-50%);
  width: 150px;
  height: 30px;
  background: rgba(255, 51, 102, 0.05);
  animation: pulse-slow 4s ease-in-out infinite;
}

.filter-blob-blue {
  top: 50%;
  right: 20%;
  transform: translateY(-50%);
  width: 180px;
  height: 30px;
  background: rgba(96, 165, 250, 0.05);
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.8; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.05); }
}

/* Subtitle (Mobile - above container) */
.filter-prism-subtitle {
  display: none;
  text-align: center;
  font-size: 10px;
  font-style: italic;
  color: #6b7280;
  margin: 0 0 6px 0;
  padding: 0 10px;
}

.filter-prism-subtitle span {
  color: #ff3366;
  font-weight: 600;
}

/* Main layout - Desktop: Flex Row */
.filter-prism-grid {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
}

/* Filter Label (Desktop) */
.filter-prism-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  margin-right: 2px;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.filter-prism-header > svg {
  width: 14px;
  height: 14px;
  stroke: #9ca3af;
  fill: none;
  flex-shrink: 0;
}

.filter-prism-header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.filter-prism-header-text span {
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  white-space: nowrap;
}

.filter-prism-header-text small {
  font-size: 8px;
  font-style: italic;
  color: #9ca3af;
  white-space: nowrap;
}

.filter-prism-header-text small em {
  color: #ff3366;
  font-style: italic;
  font-weight: 600;
}

/* Cards Container */
.filter-prism-cards {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

/* Card - Pill shape on desktop */
.filter-prism-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #FFFFFF; /* Pure white for maximum contrast */
  border: 1px solid #E2E8F0; /* Subtle Gray-200 border */
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  /* Multi-layered elevation shadow */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

/* Inner border overlay - Removed */
.filter-prism-card::before {
  content: none;
}

/* Hover effects wrapped to prevent 'sticky' states on touch devices */
@media (hover: hover) {
  .filter-prism-card:hover {
    background: #FFFFFF;
    border-color: #94A3B8; /* Slate-400 */
    transform: translateY(-3px); /* Physical Lift */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* Deep elevation shadow */
    text-decoration: none;
  }

  .filter-prism-card:hover .filter-prism-icon svg {
    stroke: #000000;
  }

  .filter-prism-card:hover .filter-prism-icon.icon-asian img,
  .filter-prism-card:hover .filter-prism-icon.icon-woman img {
    filter: brightness(0);
    opacity: 1;
  }

  .filter-prism-explore:hover {
    background: #333;
    text-decoration: none;
    color: #fff;
  }

  .filter-prism-explore:hover .icon-search {
    transform: scale(1.1);
  }

  .filter-prism-explore:hover .icon-chevron {
    transform: translateX(2px);
  }
}

.filter-prism-card:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-prism-card.active {
  background: #FFFFFF;
  border-color: #ff3366;
  box-shadow: 0 10px 15px -3px rgba(255, 51, 102, 0.2), 0 4px 6px -2px rgba(255, 51, 102, 0.05);
}

/* Icon - Circular on desktop */
.filter-prism-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 9999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.filter-prism-icon svg {
  width: 12px;
  height: 12px;
  stroke: #111827; /* Dark monochromatic (Gray-900) */
  fill: none;
}

.filter-prism-card.active .filter-prism-icon {
  background: #ff3366;
  box-shadow: 0 4px 12px rgba(255, 51, 102, 0.25);
}

.filter-prism-card.active .filter-prism-icon svg {
  stroke: #fff;
}

/* Image icons - shared style */
.filter-prism-icon.icon-asian img,
.filter-prism-icon.icon-woman img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0); /* Force monochromatic black */
  opacity: 0.7;
}

.filter-prism-card.active .filter-prism-icon.icon-asian img,
.filter-prism-card.active .filter-prism-icon.icon-woman img {
  filter: brightness(0) invert(1); /* White when active for contrast */
}

/* Text */
.filter-prism-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
  min-width: 0;
}

.filter-prism-label {
  font-size: 10px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-prism-card.active .filter-prism-label {
  color: #1a1a1a;
}

.filter-prism-status {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-top: 0;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.filter-prism-card.active .filter-prism-status {
  color: #ff3366;
}

/* Checkmark */
.filter-prism-check {
  display: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  background: rgba(255, 51, 102, 0.1);
  border: 1px solid rgba(255, 51, 102, 0.2);
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-prism-check svg {
  width: 8px;
  height: 8px;
  stroke: #ff3366;
  stroke-width: 3;
  fill: none;
}

.filter-prism-card.active .filter-prism-check {
  display: flex;
}

/* Explore Button - Black pill */
.filter-prism-explore {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: 40px;
  background: #000;
  border: none;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

/* =========================================== */
/* Responsive - Tablet (2x2 Grid) */
/* =========================================== */
@media (max-width: 1100px) {
  .filter-prism-subtitle {
    display: block;
    font-size: 10px;
    margin-bottom: 6px;
  }

  .filter-prism-container {
    border-radius: 20px;
    max-width: 500px;
    padding: 4px;
  }

  .filter-prism-grid {
    flex-direction: column;
    padding: 12px;
    gap: 10px;
  }

  .filter-prism-header {
    display: none;
  }

  .filter-prism-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  .filter-prism-card {
    border-radius: 14px;
    padding: 12px;
    gap: 8px;
  }

  .filter-prism-card::before {
    border-radius: 14px;
  }

  .filter-prism-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
  }

  .filter-prism-icon svg {
    width: 16px;
    height: 16px;
  }

  .filter-prism-icon.icon-asian img,
  .filter-prism-icon.icon-woman img {
    width: 18px;
    height: 18px;
  }

  .filter-prism-label {
    font-size: 12px;
  }

  .filter-prism-status {
    font-size: 8px;
  }

  .filter-prism-check {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  .filter-prism-check svg {
    width: 10px;
    height: 10px;
  }

  .filter-prism-explore {
    width: 100%;
    height: auto;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 10px;
  }

  .filter-blob-pink {
    top: 20%;
    left: 20%;
    transform: none;
    width: 80px;
    height: 80px;
  }

  .filter-blob-blue {
    bottom: 20%;
    right: 20%;
    top: auto;
    transform: none;
    width: 100px;
    height: 100px;
  }
}

/* =========================================== */
/* Responsive - Mobile (2x2 Grid compact) */
/* =========================================== */
@media (max-width: 600px) {
  .filter-prism-subtitle {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .filter-prism-container {
    border-radius: 18px;
    margin: 10px 8px;
  }

  .filter-prism-grid {
    padding: 10px;
    gap: 8px;
  }

  .filter-prism-cards {
    gap: 8px;
  }

  .filter-prism-card {
    padding: 12px;
    border-radius: 14px;
    gap: 6px;
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-prism-card::before {
    border-radius: 14px;
  }

  .filter-prism-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 9px;
  }

  .filter-prism-icon svg {
    width: 15px;
    height: 15px;
  }

  .filter-prism-icon.icon-asian img,
  .filter-prism-icon.icon-woman img {
    width: 17px;
    height: 17px;
  }

  .filter-prism-label {
    font-size: 11px;
    line-height: 1.2;
  }

  .filter-prism-status {
    font-size: 8px;
    letter-spacing: 0.05em;
  }

  .filter-prism-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    min-width: 18px;
  }

  .filter-prism-check svg {
    width: 9px;
    height: 9px;
  }

  .filter-prism-explore {
    padding: 12px;
    border-radius: 12px;
    font-size: 9px;
    gap: 6px;
  }

  .filter-prism-explore .icon-search,
  .filter-prism-explore .icon-chevron {
    width: 10px;
    height: 10px;
  }

  .filter-blob-pink {
    width: 50px;
    height: 50px;
    top: 10%;
    left: 10%;
  }

  .filter-blob-blue {
    width: 60px;
    height: 60px;
    bottom: 10%;
    right: 10%;
  }
}

/* Hide old filter options when new design is active */
.filter-prism-container ~ .filter-options,
.filter-prism-container + .filter-options {
  display: none !important;
}
