.singleDateContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.dateField {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.dateLabel {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
  font-size: 14px;
}

/* Date Picker Styles */
.mxDatepicker {
  position: relative;
  display: inline-block;
  width: 100%;
  color: #73879c;
  font: 14px / 1.5 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', sans-serif;
}

.mxDatepicker * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.mxInputWrapper {
  position: relative;
  width: 100%;
}

.mxInputSingle {
  display: inline-block;
  width: 100%;
  /* min-height: 38px; */
  /* padding: 8px 35px 8px 8px; */
  font-size: 14px !important;
  line-height: 1.5;
  color: #555 !important;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  font-family: "Lato", Avenir, Verdana, Nunito, sans-serif;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Hide default date picker calendar icon only - Keep date value visible on desktop */
.mxInputSingle[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
}

/* Hide inner spin button and clear button */
.mxInputSingle[type="date"]::-webkit-inner-spin-button,
.mxInputSingle[type="date"]::-webkit-clear-button {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
}

/* Keep date edit fields visible on desktop Chrome - these show the date value */
.mxInputSingle[type="date"]::-webkit-datetime-edit-fields-wrapper {
  display: inline-block !important;
  padding: 0 !important;
  width: 100% !important;
}

.mxInputSingle[type="date"]::-webkit-datetime-edit {
  display: inline-block !important;
  width: 100% !important;
}

.mxInputSingle[type="date"]::-webkit-datetime-edit-text {
  color: #555 !important;
  padding: 0 2px;
  display: inline-block;
}

.mxInputSingle[type="date"]::-webkit-datetime-edit-month-field,
.mxInputSingle[type="date"]::-webkit-datetime-edit-day-field,
.mxInputSingle[type="date"]::-webkit-datetime-edit-year-field {
  color: #555 !important;
  padding: 0 2px;
  display: inline-block;
  background: transparent !important;
}

/* Firefox - Hide default date picker icon */
.mxInputSingle[type="date"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.mxInputSingle[type="date"]::-moz-calendar-picker-indicator {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
}

.mxInputSingle:focus {
  outline: 0;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  background-color: #fff;
}

.mxInputAppend {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 4px;
  pointer-events: auto;
  cursor: pointer;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-sizing: border-box;
  background-color: transparent;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mxCalendarIcon {
  width: 100%;
  height: 100%;
  color: #555;
  stroke-width: 1.5px;
  stroke: currentColor;
  fill: none;
  display: block;
  cursor: pointer;
  pointer-events: auto;
  flex-shrink: 0;
}

.mxCalendarIcon:hover {
  opacity: 0.7;
}

/* Responsive adjustments - Mobile devices */
@media (max-width: 768px) {
  .mxInputSingle {
    /* padding: 8px 30px 8px 8px !important; */
    font-size: 16px !important; /* Prevent zoom on iOS */
    height: 30px !important;
    line-height: 1.5 !important;
  }
  
  .mxInputAppend {
    width: 28px;
    height: 28px;
    padding: 4px;
    right: 6px;
  }
  
  .mxCalendarIcon {
    width: 18px;
    height: 18px;
  }
  
  .dateLabel {
    font-size: 12px;
    margin-bottom: 0.3rem;
  }
}

@media (max-width: 480px) {
  .mxInputSingle {
    padding-left: 8px;
    font-size: 16px !important; /* Prevent zoom on iOS and Android */
    /* height: 40px !important; */
    line-height: 1.5 !important;
  }
  
  .mxInputAppend {
    width: 26px;
    height: 26px;
    padding: 3px;
    right: 5px;
  }
  
  .mxCalendarIcon {
    width: 16px;
    height: 16px;
  }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  .mxInputSingle {
    font-size: 16px !important; /* Prevent zoom on iOS Safari/Chrome */
    appearance: none !important;
    -webkit-appearance: none !important;
    border-radius: 4px;
    padding: 8px 30px 8px 8px !important;
    height: 38px !important;
  }
  
  .mxInputSingle:focus {
    font-size: 16px !important;
  }
  
  .mxInputWrapper {
    -webkit-tap-highlight-color: transparent;
  }
  
  .mxInputAppend {
    -webkit-tap-highlight-color: transparent;
  }
  
  .mxCalendarIcon {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Hide iOS date picker icons */
  .mxInputSingle[type="date"]::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
  }
}

/* Android specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
  .mxInputSingle[type="date"] {
    font-size: 12px !important; /* Prevent zoom on Android */
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  
  /* Hide Android Chrome date picker icon */
  .mxInputSingle[type="date"]::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
  
  .mxInputSingle[type="date"]::-webkit-inner-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
}

/* Samsung Internet and other Android browsers */
@supports (-webkit-appearance: none) {
  .mxInputSingle[type="date"]::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

