/* =========================================================
   Rasta Pets – Custom Select (Modern & Minimalist)
   Componente para reemplazar selects nativos
   ========================================================= */

.custom-select {
  position: relative;
  width: 100%;
  user-select: none;
  font-family: var(--font-family, 'Plus Jakarta Sans', sans-serif);
}

.custom-select[data-disabled="true"] .cs-selected {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.cs-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  box-sizing: border-box;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.cs-selected:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.custom-select.open .cs-selected {
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.cs-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  color: #64748b;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.custom-select.open .cs-icon {
  transform: rotate(180deg);
  color: #0f172a;
}

.cs-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.custom-select.open .cs-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cs-option {
  padding: 9px 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cs-option.selected {
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
}

/* Custom Scrollbar for options */
.cs-options::-webkit-scrollbar {
  width: 5px;
}
.cs-options::-webkit-scrollbar-track {
  background: transparent;
}
.cs-options::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 10px;
}
.cs-options::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* Soporte para iconos a la izquierda en formularios */
.input-icon-wrapper .custom-select .cs-selected {
  padding-left: 48px !important;
}
