/* Granular Manager 026: iPhone-native date input visual containment.
   Keeps real date/datetime-local input alive and clickable, but removes
   Safari's intrinsically-wide date rendering (including the "BE" era text).
   This stylesheet loads AFTER manager-mobile-v025.css. */
@media screen and (max-width: 767px) {
  .admin-body #admin-workspace .mgr-date-widget {
    position: relative !important;
    display: block !important;
    isolation: isolate;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-inline-size: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e9cdbb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden !important;
  }
  .admin-body #admin-workspace .mgr-date-widget:focus-within {
    outline: 2px solid #c84a19;
    outline-offset: 1px;
  }
  .admin-body #admin-workspace .mgr-date-widget .mgr-date-text {
    position: absolute; inset: 0;
    z-index: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 0 36px 0 12px;
    width: 100%; min-width: 0; max-width: 100%;
    color: #2b221e;
    background: transparent;
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
  }
  .admin-body #admin-workspace .mgr-date-widget .mgr-date-text::after {
    content: "";
    position: absolute;right: 14px;top: 50%;
    width: 9px;height:9px;
    border-right: 2px solid #9c4a23;
    border-bottom: 2px solid #9c4a23;
    transform: translateY(-70%) rotate(45deg);
  }
  /* The native date field is the whole transparent tap target.
     Do not use display:none / visibility:hidden / pointer-events:none:
     these would disable native iOS date selection. */
  .admin-body #admin-workspace .mgr-date-widget > input:is([type="date"],[type="datetime-local"]) {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    display: block !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    box-sizing: border-box !important;
    inline-size: 100% !important;
    width: 100% !important;
    max-inline-size: 100% !important;
    max-width: 100% !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    opacity: 0 !important;
    color: transparent !important;
    cursor: pointer;
    -webkit-min-logical-width: 0 !important;
  }
  .admin-body #admin-workspace .mgr-date-widget > input:focus {outline: none !important;}
  .admin-body #admin-workspace .mgr-date-widget > input::-webkit-date-and-time-value {
    max-inline-size:100%; min-inline-size:0;
  }
  /* The date controls in the 3-column navigation must shrink in the middle
     instead of pushing either arrow beyond the panel. */
  .admin-body #admin-workspace :is(.manager-board-controls,.overview-period-controls,.manager-booking-filters) > label:has(.mgr-date-widget) {
    box-sizing:border-box;min-width:0!important;min-inline-size:0!important;
    width:100%!important;max-width:100%!important;overflow:visible!important;
  }
  .admin-body #admin-workspace :is(.manager-board-controls,.overview-period-controls,.manager-booking-filters) .mgr-date-widget {
    width:100%!important;max-width:100%!important;
  }
  .admin-body #admin-workspace .form-grid label:has(.mgr-date-widget),
  .admin-body #admin-workspace .admin-form label:has(.mgr-date-widget) {
    min-width:0!important;max-width:100%!important;overflow:visible!important;
  }
}
