/* Custom Select Overlay */
.select-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(5px);
}

.select-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.select-container {
  background: rgba(26, 32, 44, 0.95);
  border: 1px solid #2d3748;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s ease;
  position: relative;
}

.select-overlay.active .select-container {
  transform: translateY(0);
}

.select-header {
  position: relative;
  margin: 0 auto 10px;
  text-align: center;
  width: 100%;
  padding: 0 30px;
}

.select-subtitle {
  color: #a0aec0;
  font-size: 0.8em;
  margin: 0 auto 15px;
  text-align: center;
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

.select-actions {
  margin-top: 15px;
  text-align: right;
}

.select-done {
  background: #26c6da;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}

.select-done:hover {
  background: #22b3c7;
}

.options-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
  max-width: 100%;
}

.option-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 5px;
  background: rgba(45, 55, 72, 0.5);
  border: 1px solid #4a5568;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 100%;
  min-height: 70px;
}

.option-item:hover {
  background: rgba(56, 65, 85, 0.8);
  border-color: #26c6da;
}

.option-item.selected {
  background: rgba(38, 198, 218, 0.25);
  border-color: #26c6da;
  box-shadow: 0 0 0 2px rgba(38, 198, 218, 0.3);
}

.option-icon {
  font-size: 20px;
  margin-bottom: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(38, 198, 218, 0.1);
  border-radius: 50%;
  border: 1px solid rgba(38, 198, 218, 0.3);
}

.option-label {
  font-size: 0.7em;
  color: #e2e8f0;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  padding: 0 2px;
}

.custom-select-button {
  width: 100%;
  padding: 12px 16px;
  background: rgba(45, 55, 72, 0.7);
  border: 1px solid #4a5568;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.95em;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.custom-select-button:hover {
  background: rgba(56, 65, 85, 0.8);
  border-color: #26c6da;
}

.custom-select-button .selected-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  text-align: left;
  width: 100%;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 65, 85, 0.5);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85em;
  gap: 4px;
}

.tag-remove {
  cursor: pointer;
  padding: 0 2px;
  font-size: 1.1em;
  line-height: 1;
}

.tag-remove:hover {
  color: #f56565;
}

.custom-select-button .dropdown-arrow {
  font-size: 0.7em;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.custom-select-button.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .options-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .select-container {
    width: 95%;
    padding: 15px;
  }
}
