/* Message and contact selections: category-filter colours and controls.
   Preserve native change events and the contact form's hidden product lists. */
:is(#sendOrderMessage, #contact .contact-form-box) div.selector {
  width: 100% !important;
  max-width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}
:is(#sendOrderMessage, #contact .contact-form-box) div.selector > span {
  display: none;
}
:is(#sendOrderMessage, #contact .contact-form-box) select.form-control {
  position: static;
  opacity: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 8px 40px 8px 12px;
  border: 1px solid #dce0e5;
  border-radius: 6px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23606872' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: #24282d;
  font-family: inherit;
  font-size: 14px;
  line-height: 24px;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}
:is(#sendOrderMessage, #contact .contact-form-box) select.form-control:hover {
  border-color: #a0a7af;
}
:is(#sendOrderMessage, #contact .contact-form-box) select.form-control:focus {
  border-color: #f80823;
  outline: 2px solid #ffe5e9;
  outline-offset: 1px;
  box-shadow: none;
}
:is(#sendOrderMessage, #contact .contact-form-box) select.form-control:disabled {
  background-color: #f7f8fa;
  color: #737b84;
  cursor: default;
}
@media (max-width: 767px) {
  :is(#sendOrderMessage, #contact .contact-form-box) select.form-control { font-size: 16px; }
}

/* Same open list as category filters. */
.ec27-form-dropdown.selectize-control { width: 100%; min-width: 0; height: auto; padding: 0; border: 0; background: none; box-shadow: none; }
.ec27-form-dropdown .selectize-input { display: flex; align-items: center; min-height: 42px; padding: 10px 38px 10px 12px; border: 1px solid #dce0e5; border-radius: 6px; background: #fff; color: #24282d; font: inherit; box-shadow: none; cursor: pointer; }
.ec27-form-dropdown .selectize-input > .item { white-space: normal; overflow-wrap: anywhere; }
.ec27-form-dropdown .selectize-input.focus { border-color: #f80823; box-shadow: 0 0 0 2px #ffe5e9; }
.ec27-form-dropdown.single .selectize-input:after { right: 16px; width: 7px; height: 7px; margin-top: -5px; border: solid #606872; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.ec27-form-dropdown.single .selectize-input.dropdown-active:after { margin-top: -1px; transform: rotate(225deg); }
.ec27-form-dropdown .selectize-dropdown { margin-top: 5px; padding: 5px; border: 1px solid #dce0e5; border-radius: 6px; background: #fff; box-shadow: 0 6px 18px rgba(25,29,33,.12); z-index: 100; font-family: inherit; font-size: 14px; }
.ec27-form-dropdown .selectize-dropdown-content { max-height: 240px; }
.ec27-form-dropdown .selectize-dropdown .option { padding: 12px; border-radius: 4px; color: #454b52; line-height: 20px; cursor: pointer; overflow-wrap: anywhere; }
.ec27-form-dropdown .selectize-dropdown .option.active,
.ec27-form-dropdown .selectize-dropdown .option.selected { background: #fff0f2; color: #df0021; }
.ec27-form-dropdown .selectize-dropdown .option.selected { font-weight: 700; }
@media (max-width: 767px) { .ec27-form-dropdown .selectize-input > input { font-size: 16px; } }

/* Category sort: retain toolbar sizing while sharing the styled options. */
#category .productsSortForm .ec27-form-dropdown.selectize-control {
  flex: 1 1 260px; width: 260px; min-width: 0; max-width: 100%;
  height: auto; min-height: 0; padding: 0; border: 0; background: transparent;
}
#category .productsSortForm .ec27-form-dropdown .selectize-input { min-height: 46px; font-size: 14px; }
#category .productsSortForm .ec27-form-dropdown .selectize-dropdown { width: 100% !important; }
#category .sortPagiBar, #category .content_sortPagiBar { overflow: visible; }
@media (max-width: 767px) {
  #category .productsSortForm .ec27-form-dropdown.selectize-control { width: auto; }
  #category .productsSortForm .ec27-form-dropdown .selectize-input { min-height: 42px; }
}

/* Shared dropdowns throughout the storefront; existing specialised widgets retained. */
#page .ec27-form-dropdown.selectize-control { min-width: 0; max-width: 100%; height: auto; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
#page .ec27-form-dropdown .selectize-dropdown .option.selected,
#page .ec27-form-dropdown .selectize-dropdown .option.active { color: #df0021; background: #fff0f2; }
#page .ec27-form-dropdown .selectize-dropdown .option.selected { font-weight: 700; }
#page .ec27-form-dropdown .selectize-dropdown { background: #fff; }
#page .ec27-form-dropdown .selectize-input > input { min-height: 0; box-shadow: none; }

/* The category form-control rules must not pad the Selectize wrapper.
   Keep the same geometry when Advanced Search replaces the sort toolbar. */
:is(body#category, body#manufacturer, body#new-products) #center_column .productsSortForm .selectize-control.ec27-form-dropdown {
  padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent;
  height: 46px; min-height: 0; max-height: none; box-shadow: none;
  align-self: center; overflow: visible; box-sizing: border-box;
}
:is(body#category, body#manufacturer, body#new-products) #center_column .productsSortForm .selectize-control.ec27-form-dropdown > .selectize-input {
  display: flex; align-items: center; width: 100%; height: 46px; min-height: 46px;
  margin: 0; padding: 8px 38px 8px 12px; box-sizing: border-box; line-height: 22px;
}
@media (max-width: 767px) {
  :is(body#category, body#manufacturer, body#new-products) #center_column .productsSortForm .selectize-control.ec27-form-dropdown { height: 42px; }
  :is(body#category, body#manufacturer, body#new-products) #center_column .productsSortForm .selectize-control.ec27-form-dropdown > .selectize-input { height: 42px; min-height: 42px; }
}

/* Registration birthday: one control per field and room for the complete month. */
#page #center_column form.std .ec27-registration-birthday > .row {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr) minmax(0, 1fr);
  width: 100%; max-width: 420px; gap: 8px; margin: 0;
}
#page #center_column form.std .ec27-registration-birthday > .row::before,
#page #center_column form.std .ec27-registration-birthday > .row::after { display: none; }
#page #center_column form.std .ec27-registration-birthday > .row > .col-xs-4 {
  float: none; width: auto; max-width: none; min-width: 0; padding: 0;
}
#page #center_column form.std .ec27-registration-birthday > .row > .col-xs-4 .form-control {
  width: 100%; max-width: none;
}
#page #center_column form.std .ec27-registration-birthday .ec27-form-dropdown.selectize-control.form-control {
  min-height: 0; height: auto; padding: 0; margin: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none;
}
#page #center_column form.std .ec27-registration-birthday .selectize-input {
  display: flex; flex-wrap: nowrap; align-items: center; width: 100%; height: 44px;
  min-height: 44px; padding: 10px 26px 10px 10px; box-sizing: border-box;
}
#page #center_column form.std .ec27-registration-birthday .selectize-input > .item {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  overflow-wrap: normal; word-break: normal;
}
#page #center_column form.std .ec27-registration-birthday .selectize-input > input {
  flex: 1 1 0; min-width: 0 !important; min-height: 0 !important; max-width: 100%;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0;
  background: transparent !important; line-height: 22px; box-shadow: none !important;
}
#page #center_column form.std .ec27-registration-birthday .selectize-input::after {
  right: 10px; width: 7px; height: 7px; margin-top: -5px;
  border: solid #606872; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
#page #center_column form.std .ec27-registration-birthday .selectize-input.dropdown-active::after {
  margin-top: -1px; transform: rotate(225deg);
}
#page #center_column form.std .ec27-registration-birthday .selectize-dropdown { min-width: 84px; }
#page #center_column form.std .ec27-registration-birthday #months + .selectize-control .selectize-dropdown { min-width: 160px; }
#page #center_column form.std .ec27-registration-birthday #years + .selectize-control .selectize-dropdown { min-width: 96px; }
#page #center_column form.std .ec27-registration-birthday .selectize-dropdown .option {
  white-space: nowrap; overflow-wrap: normal; word-break: normal;
}
@media (max-width: 480px) {
  #page #center_column form.std .ec27-registration-birthday > .row { gap: 6px; }
  #page #center_column form.std .ec27-registration-birthday .selectize-input {
    padding: 10px 20px 10px 6px; font-size: 14px;
  }
  #page #center_column form.std .ec27-registration-birthday .selectize-input::after { right: 7px; }
}
