#bestwine-event-form-wrap,
.bestwine-event-form-wrap {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.bestwine-event-form {
  display: grid;
  gap: 18px;
}

.bestwine-event-form__group {
  display: grid;
  gap: 8px;
}

.bestwine-event-form__label {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  color: #2a2a2a;
}

.bestwine-event-form__input,
.bestwine-event-form__select,
.bestwine-event-form__textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  min-height: 56px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  background: #fff;
  color: #1f1f1f;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
}

.bestwine-event-form__textarea {
  min-height: 140px;
  resize: vertical;
}

.bestwine-event-form__input:focus,
.bestwine-event-form__select:focus,
.bestwine-event-form__textarea:focus {
  outline: none;
  border-color: #9f1d2a;
  box-shadow: 0 0 0 3px rgba(159, 29, 42, 0.12);
}

.bestwine-event-form__field-error {
  font-size: 14px;
  color: #8c2525;
  margin-top: -2px;
}

.bestwine-event-form__input.is-invalid,
.bestwine-event-form__select.is-invalid,
.bestwine-event-form__textarea.is-invalid {
  border-color: #d83b3b;
  box-shadow: 0 0 0 3px rgba(216, 59, 59, 0.10);
}

.bestwine-event-form__toggle,
.bestwine-event-form__toggle:hover,
.bestwine-event-form__toggle:focus,
.bestwine-event-form__toggle:active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 1px solid #d9d9d9;
  background: #fafafa;
  color: #333 !important;
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  outline: none;
  opacity: 1 !important;
  transition: none;
  user-select: none;
  box-sizing: border-box;
}

.bestwine-event-form__toggle *,
.bestwine-event-form__toggle:hover *,
.bestwine-event-form__toggle:focus *,
.bestwine-event-form__toggle:active * {
  color: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  text-shadow: none !important;
}

.bestwine-event-form__toggle-text {
  flex: 1;
}

.bestwine-event-form__toggle-icon {
  font-size: 24px;
  line-height: 1;
  transition: transform .25s ease;
  flex-shrink: 0;
}

.bestwine-event-form__help {
  margin-top: -8px;
  color: #6a6a6a;
  font-size: 14px;
}

.bestwine-event-form__details {
  display: none;
  gap: 18px;
  padding-top: 4px;
}

.bestwine-event-form.is-open .bestwine-event-form__details {
  display: grid;
}

.bestwine-event-form.is-open .bestwine-event-form__toggle-icon {
  transform: rotate(45deg);
}

.bestwine-event-form__checkbox-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 24px;
  padding: 4px 0;
}

.bestwine-event-form__checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  color: #2a2a2a;
}

.bestwine-event-form__checkbox-item span {
  display: block;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bestwine-event-form__checkbox-item input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.bestwine-event-form__actions {
  display: grid;
  gap: 10px;
}

.bestwine-event-form__button {
  border: 0;
  border-radius: 10px;
  min-height: 58px;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}

.bestwine-event-form__button:hover {
  opacity: .95;
}

.bestwine-event-form__button:active {
  transform: translateY(1px);
}

.bestwine-event-form__note {
  font-size: 14px;
  color: #6a6a6a;
}

.bestwine-event-form__required {
  color: #9f1d2a;
}

.bestwine-event-form__alert {
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  margin-bottom: 18px;
}

.bestwine-event-form__alert--success {
  background: #edf8f0;
  color: #215732;
  border: 1px solid #bddfca;
}

.bestwine-event-form__alert--error {
  background: #fff3f3;
  color: #8c2525;
  border: 1px solid #efc3c3;
}

.bestwine-event-form__honeypot {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

.ui-datepicker {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.12);
  z-index: 99999 !important;
}

.ui-datepicker .ui-datepicker-header {
  position: relative;
  margin-bottom: 10px;
  padding: 0 44px;
  min-height: 36px;
}

.ui-datepicker .ui-datepicker-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  text-align: center;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fafafa;
  color: #333;
  cursor: pointer;
  text-decoration: none;
}

.ui-datepicker .ui-datepicker-prev {
  left: 0;
}

.ui-datepicker .ui-datepicker-next {
  right: 0;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
  border-color: #9f1d2a;
}

.ui-datepicker table {
  width: 100%;
  border-collapse: collapse;
}

.ui-datepicker th {
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  color: #666;
  text-align: center;
}

.ui-datepicker td {
  padding: 2px;
}

.ui-datepicker td a,
.ui-datepicker td span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  color: #222;
  text-decoration: none;
}

.ui-datepicker td a:hover {
  background: #f6e6e8;
}

.ui-datepicker td.ui-datepicker-current-day a {
  background: #9f1d2a;
  color: #fff;
}

.ui-datepicker td.ui-datepicker-today a {
  box-shadow: inset 0 0 0 1px #9f1d2a;
}

.ui-datepicker .ui-state-disabled span {
  color: #b8b8b8;
}

@media (max-width: 767px) {
  .bestwine-event-form-wrap {
    max-width: 100%;
  }

  .bestwine-event-form__checkbox-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .bestwine-event-form__input,
  .bestwine-event-form__select,
  .bestwine-event-form__textarea,
  .bestwine-event-form__button,
  .bestwine-event-form__toggle {
    font-size: 16px;
  }
}
