/* Sleep Inn Booking Form Styles */

.custom-ibe-form {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  background: #fff9c4;
  padding: 30px;
  border-radius: 16px;
  justify-content: center;
  align-items: flex-end;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.custom-ibe-form,
.custom-ibe-form * {
  font-family: inherit !important;
}

.custom-ibe-form label {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  color: #000;
  flex: 1;
  min-width: 140px;
  overflow: hidden;
}

.custom-ibe-form .ibe-label {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Critical iOS Safari fix - wrapper for inputs */
.custom-ibe-form .input-wrapper {
  display: flex;
  width: 100%;
  overflow: hidden;
}

.custom-ibe-form input {
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: #000;
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  margin: 0;
}

/* iOS Safari date input fix - removed textfield appearance to show icon */
.custom-ibe-form input[type="date"] {
  display: flex;
  position: relative;
}

/* Show the calendar picker indicator */
.custom-ibe-form input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  position: relative;
  z-index: 2;
  margin-left: 5px;
  width: 20px;
  height: 20px;
  background-size: 20px 20px;
}

/* Style for empty date inputs to show placeholder-like text */
.custom-ibe-form input[type="date"]:not(:focus):invalid {
  color: #bbb;
}

.custom-ibe-form input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

.custom-ibe-form input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

/* Show placeholder text for empty date fields */
.custom-ibe-form input[type="date"]:not(:focus):not(:valid)::before {
  content: attr(placeholder);
  color: #bbb;
  width: 100%;
}

.custom-ibe-form input[type="date"]:focus::before,
.custom-ibe-form input[type="date"]:valid::before {
  display: none;
}

.custom-ibe-form input:focus {
  outline: none;
  border-color: #fdd835;
  box-shadow: 0 4px 12px rgba(253, 216, 53, 0.3);
}

.custom-ibe-form input:hover {
  border-color: #ffeb3b;
}

.custom-ibe-form input::placeholder {
  color: #bbb;
}

.custom-ibe-form input::-webkit-input-placeholder {
  color: #bbb;
}

.custom-ibe-form input::-moz-placeholder {
  color: #bbb;
  opacity: 1;
}

.custom-ibe-form input[type="number"]::-webkit-outer-spin-button,
.custom-ibe-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-ibe-form input[type="number"] {
  -moz-appearance: textfield;
}

/* Button */
.custom-ibe-form .ibe-submit,
.custom-ibe-form .ibe-submit span {
  background: #ffeb3b;
  border: none;
  border-radius: 30px;
  padding: 12px 25px;
  font-size: 16px;
  color: #000 !important;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  box-shadow: none !important;
  background-image: none !important;
  -webkit-text-fill-color: #000 !important;
  text-shadow: none !important;
}

.custom-ibe-form .ibe-submit:hover {
  background: #fdd835;
  color: #000 !important;
}

.custom-ibe-form .ibe-submit:focus {
  outline: none;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .custom-ibe-form {
    flex-direction: column;
    padding: 25px 20px;
    gap: 20px;
    align-items: stretch;
  }
  
  .custom-ibe-form label {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  
  .custom-ibe-form .input-wrapper {
    width: 100%;
    max-width: 100%;
  }
  
  .custom-ibe-form input {
    padding: 16px;
    font-size: 16px;
    min-height: 52px;
  }
  
  /* Make calendar icon larger on mobile */
  .custom-ibe-form input[type="date"]::-webkit-calendar-picker-indicator {
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
  }
  
  .custom-ibe-form .ibe-label {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .custom-ibe-form .ibe-submit {
    width: 100%;
    padding: 18px 30px;
    font-size: 17px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .custom-ibe-form {
    padding: 20px 15px;
    border-radius: 12px;
    gap: 18px;
  }
  
  .custom-ibe-form input {
    padding: 14px;
    font-size: 16px;
  }
  
  .custom-ibe-form .ibe-submit {
    padding: 16px 25px;
    font-size: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .custom-ibe-form {
    gap: 12px;
    padding: 25px;
  }
  
  .custom-ibe-form label {
    min-width: calc(50% - 6px);
  }
  
  .custom-ibe-form .ibe-submit {
    width: 100%;
    margin-top: 10px;
  }
}