/* Modal Setup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(
    0,
    0,
    0,
    0.75
  ); /* Darkened slightly to make your white SVG pop heavily */
  display: flex;
  flex-direction: column; /* Stacks the SVG directly on top of the content box */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 40px 30px 30px 30px; /* Extra top padding so elements clear the overlapping SVG */
  border-radius: 12px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  font-family: sans-serif;
  z-index: 1005; /* Elevated above overlay background */
}

.modal-header-text {
  text-align: center;
  margin-bottom: 20px;
}
.hidden {
  display: none !important;
}
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  border: none;
  background: none;
  cursor: pointer;
}

/* Header & Toggle styling */
.modal-header-svg {
  text-align: center;
  width: 70%; /* Set explicit layout size */
  height: auto;
  margin-bottom: -5px; /* Slight negative margin pulls the SVG down to rest beautifully over the edge */
  z-index: 1010; /* Higher than modal-content so it overlays cleanly */
  pointer-events: none;
}
.toggle-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}
.toggle-btn {
  padding: 8px 20px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  text-transform: lowercase;
  transition: all 0.2s ease;
}
.toggle-btn.active {
  text-transform: uppercase;
  font-weight: bold;
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Inputs & Labels */
.input-wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}
.input-wrapper label {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}
.input-wrapper input {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

/* Volume & Blacklist Layouts */
.volume-container,
.blacklist-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.section-label {
  font-size: 13px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 5px;
  font-weight: bold;
}
.volume-btn,
.blacklist-item {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  border-radius: 20px;
  cursor: pointer;
}
.volume-btn.active-vol {
  background: #000;
  color: #fff;
}

/* Diagonal Strike-through for Blacklisted Nodes */
.blacklist-item.blacklisted {
  position: relative;
  color: #aaa;
  border-color: #ddd;
  background: linear-gradient(
    to top right,
    transparent 47%,
    #ff3b30 48%,
    #ff3b30 52%,
    transparent 53%
  );
}

/* Action Buttons */
.action-btn {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border: none;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

/* Perfume Cards Grid Layout */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 25px;
}
@media (max-width: 600px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.perfume-card {
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.result-badge {
  font-size: 11px;
  text-transform: uppercase;
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  width: max-content;
  margin-bottom: 10px;
  font-weight: bold;
}
.perfume-card h4 {
  margin: 0 0 8px 0;
  font-size: 22px;
  color: #111;
}
.perfume-card p {
  margin: 5px 0;
  font-size: 14px;
  color: #555;
}
.btn-investigate {
  display: block;
  text-align: center;
  background: #000;
  color: #fff;
  padding: 10px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 15px;
  font-size: 14px;
}
@media (min-width: 1025px) {
    .modal-header-svg{
        margin-bottom: -25px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .modal-header-svg{
        margin-bottom: -25px;
    }
}