.multi-select {
  position: relative;
  width: 100%;
  max-width: 520px;
  font-family: Arial, Helvetica, sans-serif;
}

/* LABEL */
.multi-select + label,
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #0f172a;
}

/* HEADER */
.multi-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 22px;
}

.multi-select-header:hover {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.multi-select.active .multi-select-header {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* TEXTO SELECCIONADO */
.selectedText {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: #334155;
}

/* CHIP SELECCIONADO */
.selectedText .chip {
  background: #e0edff;
  color: #1d4ed8;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* FLECHA */
.arrow {
  font-size: 14px;
  color: #64748b;
  transition: transform 0.3s ease;
}

.multi-select.active .arrow {
  transform: rotate(180deg);
}

/* OPCIONES */
.multi-select-options {
  position: absolute;
  width: 100%;
  bottom: calc(100% + 8px);
  top: auto;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  z-index: 50;
}

.multi-select.active .multi-select-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ITEM */
.multi-select-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
  color: #0f172a;
}

.multi-select-options label:hover {
  background: #f1f5f9;
}

/* CHECKBOX CUSTOM */
.multi-select-options input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.multi-select-options input[type="checkbox"]:checked {
  border-color: #2563eb;
  background: #2563eb;
}

.multi-select-options input[type="checkbox"]:checked::after {
  content: "✔";
  position: absolute;
  font-size: 11px;
  color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}


/* INPUT OTRO */
.input-otro {
  display: none;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  margin-top: 6px;
  font-size: 13px;
}

.input-otro:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.multi-select-options {
  max-height: 260px;
  overflow-y: auto;
}


.multi-select-options::-webkit-scrollbar {
  width: 6px;
}
.multi-select-options::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.otro-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d9dee7;
  background: #f8fafc;
  font-size: 13px;
  margin-top: 6px;
  display: none;
}

.otro-input:focus {
  border-color: #2d8cff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.15);
}


.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.select-wrapper select {
  appearance: none;
}
