:root {
  --pad: 10px;
  --field-radius: 12pt;
  --cc-green: #159129;
  --cc-blue: #0081c7;
  --bg-lightgreen: #ccffcc;
  --bg-skyblue: #75cefd;
  --transition: 0.35s;
  --blur-effect: 20px;
  --skyblue-glow: rgba(146, 229, 250, 0.9);
}

/* SELECT2 */

.select2-results__options {
  min-height: 200px;
  max-height: 400px;  /* Adjust to your desired height */
  overflow-y: auto;
}

.select2-container--default .select2-results > .select2-results__options {
  max-height: 400px !important;    /* Controls height of the popup listbox */
  overflow-y: auto;     /* Enables scrolling */
}

.select-container {
  position: relative;
  display: inline-block;
  width: 100%; /* Match input width if used in a form */
  margin-top: 20px; /* Match input spacing */
}

.select-container select {
  width: 100%;
  height: 80px;
  border-radius: 7pt;
  font-size: 24px;
  padding: 0 40px 0 15px; /* Space for chevron, and left padding like input */
  background: transparent;
  color: black;
  border: 2px solid gray;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
}

.select-container select:focus {
  border: 2px solid #353535;
  box-shadow: 0px 5px 15px var(--skyblue-glow);
  transition: all var(--transition) ease-in-out;
}

.select-container i {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #888;
  transition: color var(--transition) ease, transform 0.3s ease;
}

.select-container select:hover + i,
.select-container select:focus + i {
  color: var(--cc-blue);
  transform: translateY(-50%) scale(1.5); /* Slight zoom */
}

/* Animate on hover */
.select2-container:hover .select2-chevron {
  transform: translateY(-50%) scale(1.2);
  color: #333;
}

.select2-results__options {
  max-height: calc(2.5em * 5); /* 5 lines at ~2.5em per line */
  overflow-y: auto;
}

.select2-selection--single {
  position: relative;
  padding-right: 3.5em;
}

.select-container select,
.select2-container--default .select2-selection--single {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  padding-right: 40px;
  border-radius: 5px;
  font-size: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 48px;
}

.select2-container .select2-selection__arrow {
  display: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  /* height: 100%; */
  height: 48px;
  width: 40px;
  top: 0;
  right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-width: 8px 6px 0 6px; /* μεγαλώνει το chevron */
  display: none; /* hide the default tiny triangle */
}

/* Match Select2 to .input-field inputs */
.select2-container--default .select2-selection--single {
  height: 80px !important;
  border: 2px solid gray !important;
  border-radius: var(--field-radius) !important;
  font-size: 24px;
  padding: 25px 15px;
  margin-top: 20px;
  color: black;
  background: transparent;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 30px !important;
  color: black;
  font-size: 24px;
  padding-left: 0;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single.select2-selection--focus {
  border: 2px solid #353535;
  box-shadow: 0px 5px 15px rgba(101, 190, 250, 0.803);
  transition: all var(--transition) ease-in-out;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--bg-skyblue);
  color: black;
}

.select2-container .select2-search--dropdown .select2-search__field {
  font-size: 22px;
  padding: 10px;
}

/* Make Select2 container fill parent */
.select2-container {
  width: 100% !important;
}

/* Increase font size for dropdown options */
.select2-container .select2-results__option {
  font-size: 18px;
  padding: 12px 16px;
}

.select2-container--default .select2-selection--single {
  position: relative;
  padding-right: 45px; /* space for icon */
  height: 48px;
  border-radius: 12px;
  border: 1px solid #ced4da;
  display: flex;
  align-items: center;
  font-size: 1rem;
  background-color: white;
  transition: transform 0.8s ease;
}

/* Default chevron styling */
.select2-chevron {
  position: absolute;
  right: 15px;
  top: 50%;
  font-size: 22px;
  color: #303030;
  pointer-events: none;
  transition: transform 0.3s ease-in-out;
  transform: translateY(-50%) rotate(0deg);
}

.select2-chevron.rotate-chevron {
  transform: translateY(-50%) rotate(-180deg) !important;
  transition: transform 0.3s ease-in-out !important;
}


/* Rotated state */
.select2-container--open .select2-chevron {
  transform: rotate(180deg);
}

.select2-chevron {
  transition: transform 0.3s ease-in-out;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  font-size: 2.0rem;
  color: #a40000;
  cursor: pointer;
  position: absolute;
  right: 1.2em;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0.5;
  transition: color 0.8s ease, transform 0.8s ease;
}

/* Hover effect */
.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: #ff0000;
  transform: translateY(-50%);
  opacity: 1.0;
}

.select2-invalid .select2-selection {
  border: 3px dashed red !important;
}

.select2-container select {
  border-radius: 6px;
}

@media (max-width: 576px) {
  .select-container select {
    height: 2em;
    border-radius: 10px;
  }

  .select2-invalid .select2-selection {
    border: 2px dashed red !important;
  }

  .select2-container .select2-results__option {
    font-size: 13px;
    padding: 12px 16px;
    height: 30px;
  }

  .select2-container--default .select2-selection--single {
    height: 40px;
    border: 1px solid gray;
    border-radius: 10px;
    font-size: 24px;
    padding: 25px 15px;
    margin-top: 20px;
    color: black;
    background: transparent;
  }  
}
