/* Responsive rules shared by the two Zenturio web applications. */

.bookings-search-dialog .body { width: min(1100px, 90vw); }
.bookings-search-form { display: flex; gap: 10px; margin-bottom: 12px; }
.bookings-search-form input { flex: 1; min-width: 0; min-height: 44px; }
.bookings-search-results { max-height: 52vh; overflow: auto; }
.bookings-search-table { font-size: 16px; }
.bookings-search-table th, .bookings-search-table td { vertical-align: middle; }
.bookings-search-table th, .bookings-search-table td { white-space: nowrap; }
.bookings-search-table th:last-child, .bookings-search-table td:last-child {
  position: sticky;
  right: 0;
  background: #eee;
  box-shadow: -6px 0 8px -6px #777;
}

.login-cooldown-message {
  color: white;
  white-space: normal;
  max-width: 30ch;
  line-height: 1.4;
}

/* Account setup and recovery share the cockpit login frame. */
.manager-recovery-form {
  color: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(560px, 78vw);
  max-height: 75vh;
  overflow-y: auto;
  padding: 8px;
}
.manager-recovery-form > * { flex-shrink: 0; }
.manager-recovery-form .options-title { color: white; }
.manager-recovery-form label,
.manager-recovery-form .manager-recovery-notice {
  display: block;
  white-space: normal;
  line-height: 1.4;
}
.manager-recovery-form input,
.manager-recovery-form textarea {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}
.manager-recovery-form textarea { min-height: 100px; }
.manager-recovery-form .login-error-message {
  color: white;
  line-height: 1.4;
  text-align: left;
  font-weight: normal;
  height: auto;
  max-height: none;
  white-space: normal;
  font-size: 16px;
}

/* Wt centers dialogs itself. The legacy translate(0, 50%) moved their footer
   below short windows. Let long dialog bodies scroll while the footer stays visible. */
.Wt-dialog.dialog {
  transform: none;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  min-width: 0;
}

.Wt-dialog .dialog-layout {
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
}

.Wt-dialog .body {
  min-height: 0;
  overflow: auto !important;
}

/* A booking form has the same width constraints with any user agent. */
.zenturio-booking .booking-container,
.zenturio-booking .booking-container-mobile {
  width: min(400px, calc(100vw - 16px));
  max-width: 100%;
  min-height: calc(100vh - 16px);
  min-height: calc(100dvh - 16px);
}

.zenturio-booking .booking-registration-edit {
  min-width: 0;
  width: 100%;
}

/* Keep text readable and inputs usable when landscape height is small. */
.zenturio-booking :is(.booking-text, .booking-text-mobile, .booking-text-important,
    .booking-text-important-mobile, .booking-summary-container, .booking-summary-container-mobile,
    .booking-notes, .booking-notes-mobile, .booking-top, .booking-top-mobile,
    .booking-calendar-month-name, .booking-calendar-day-name,
    .booking-register-error-message, .login-error-message, .counter-booking-complete-text,
    .booking-registration-complete-0, .booking-registration-complete-1, .booking-registration-complete-2) {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.zenturio-booking :is(.booking-input-ok, .booking-input-nok,
    .booking-input-ok-mobile, .booking-input-nok-mobile,
    .booking-registration-entry, .booking-registration-entry-mobile,
    .booking-registration-entry-focused, .booking-registration-entry-mobile-focused) {
  min-height: 44px;
  height: 44px;
  line-height: normal;
  font-size: 16px;
}

/* The date picker is text rather than a native select, so center its label
   explicitly within the same touch target as the neighboring dropdowns. */
.zenturio-booking [data-object-name="online-booking-date"] {
  display: flex;
  align-items: center;
}

.zenturio-booking :is(.booking-push-button, .booking-push-button-mobile,
    .booking-push-button-disabled, .booking-push-button-disabled-mobile) {
  min-height: 44px;
  height: auto;
  max-height: none;
  align-items: center;
}

.zenturio-booking :is([class*="booking-step-active-"], [class*="booking-step-passive-"]) {
  width: 100px;
  height: 36px;
  line-height: 36px;
  font-size: 14px;
  padding-left: 8px;
}

.zenturio-booking :is(.booking-push-button-label, .booking-push-button-mobile-label) {
  font-size: 16px;
  line-height: 1.3;
  white-space: normal;
}

.zenturio-booking :is(.booking-login-lost-password, .booking-login-lost-password-mobile) {
  min-height: 44px;
  height: auto;
  padding: 10px 0;
  font-size: 16px;
}

.zenturio-booking :is(.booking-accept-gtc, .booking-accept-gtc-mobile, .booking-gtc) {
  font-size: 14px;
  line-height: 1.5;
}

.zenturio-booking :is(.booking-calendar-day, .booking-calendar-day-current) {
  min-width: 40px;
  min-height: 40px;
  font-size: 16px;
  line-height: 40px;
}

.zenturio-booking .booking-notes {
  min-height: 66px;
}

/* Touch targets and dialog controls must not shrink with viewport height. */
:root {
  --ngt-push-button-small-height: max(44px, 5vh);
}

.Wt-dialog :is(input, select) {
  min-height: 32px;
  font-size: 16px;
}

.Wt-dialog .dialog-label {
  white-space: normal;
}

.bookings-area {
  height: auto;
  min-width: 0;
  overflow: auto !important;
  overscroll-behavior: contain;
}

.bookings-grid {
  display: grid;
  grid-auto-rows: 32px;
}

.bookings-area [data-object-name^="box-"] {
  min-width: 44px;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 30px;
}

.bookings-area .booking-field-time {
  height: 32px;
  padding: 0;
  line-height: 32px;
  font-size: 14px;
}

/* Normal-flow player cards keep all fields reachable in narrow editors. */
.team-player-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  min-width: 0;
}

.team-player-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ngt-color);
  border-radius: 8px;
}

.team-player-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
  grid-column: span 2;
  order: 5;
}

.team-player-field > label { font-size: 14px; margin: 0; }
.team-player-field :is(input, select) { min-width: 0; min-height: 44px; font-size: 16px; width: 100%; }
.team-player-field input[type="checkbox"] { width: 44px; max-width: 44px; }
.team-player-field-0, .team-player-field-1, .team-player-field-2, .team-player-field-4 {
  grid-column: span 1;
  order: 0;
}
.team-player-field-3 { grid-column: 1 / -1; order: 1; }
.team-player-field-10 { display: none; }
.team-player-field .ngt-push-button-square { min-width: 44px; max-width: 100%; }

/* Keep the booking header/footer in Wt's layout, but scroll and wrap its body.
   Fixed player-table minimum widths otherwise clip controls on physical iPads. */
.cockpit-booking-details { min-width: 0; min-height: 0; }
.cockpit-booking-body {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 1.4fr);
  align-items: start;
  gap: 20px;
  min-width: 0;
  min-height: 0;
  overflow: auto !important;
  padding: 8px;
}
.cockpit-booking-form {
  display: grid;
  grid-template-columns: minmax(100px, 0.45fr) minmax(250px, 1fr);
  gap: 12px;
  min-width: 0;
  align-items: center;
}
.cockpit-booking-field { min-width: 0; overflow-wrap: anywhere; }
.cockpit-booking-field > :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
}
.cockpit-booking-field > textarea { min-height: 100px; }
.cockpit-booking-field .scoring-booking-details-plus-minus-container {
  min-width: 250px;
  height: 90px;
}
.cockpit-booking-field .scoring-booking-details-plus-minus-entry { min-width: 45px; }
.cockpit-booking-body .team-details-container {
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0 0 0 12px;
  overflow: visible;
}
.cockpit-booking-body .team-player-field-10 { display: flex; grid-column: 1 / -1; }
.cockpit-booking-body :is(.team-name, .team-name-le) { font-size: 16px; }
.cockpit-booking-body .team-name-le { min-height: 44px; line-height: normal; }
.cockpit-booking-body :is(.total-payment-amount, .total-payment-amount-team) {
  font-size: 20px;
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .cockpit-booking-body { grid-template-columns: minmax(0, 1fr); }
  .cockpit-booking-body .team-details-container {
    border-left: 0;
    border-top: 2px solid var(--ngt-color);
    padding: 12px 0 0;
  }
}
/* Wt 4.13 creates password inputs with a different native border. Keep the
   existing manager-dialog appearance explicit across Wt versions. */
input[data-object-name^="scoring-counter-settings-tab-login-dia-pasw"]:not(.line-edit-valid):not(.line-edit-invalid) {
  border: 2px inset;
  border-color: revert;
  border-radius: 0;
}
.zenturio-booking .booking-login-screen {
    background: #f8fafb;
}
.zenturio-booking .booking-login-screen .booking-logo {
    display: block;
    width: 100%;
    max-width: 280px;
    max-height: 110px;
    height: auto;
    object-fit: contain;
    margin: 8px auto 12px;
}
.zenturio-booking .booking-login-region {
    padding: 18px 12px 24px;
    box-sizing: border-box;
}
.zenturio-booking .booking-login-panel {
    width: 100%;
    max-width: 352px;
    margin: 0 auto;
    padding: 24px 20px 16px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    color: #202124;
}
.zenturio-booking .booking-login-heading {
    display: block;
    margin-bottom: 8px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}
.zenturio-booking .booking-login-countdown {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}
.zenturio-booking .booking-login-countdown > :first-child::after {
    content: " ·";
}
.zenturio-booking .booking-login-countdown-urgent {
    color: #b71939;
    font-weight: 600;
}
.zenturio-booking .booking-login-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.zenturio-booking .booking-login-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #c9cdd3;
    border-radius: 8px;
    background: #fff;
    color: #202124;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: none;
    cursor: pointer;
}
.zenturio-booking .booking-login-option:hover {
    background: #f3f6fa;
    border-color: #64748b;
    text-decoration: none;
}
.zenturio-booking .booking-login-option:focus-visible,
.zenturio-booking .booking-register-link:focus-visible {
    outline: 2px solid #475467;
    outline-offset: 3px;
}
.zenturio-booking .booking-login-option img {
    width: 24px;
    height: 20px;
    flex: 0 0 24px;
    margin: 0;
    padding: 0;
    object-fit: contain;
}
.zenturio-booking .booking-login-registration {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 4px;
    margin-top: 12px;
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
}
.zenturio-booking .booking-register-link {
    min-height: 44px;
    padding: 10px 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #344054;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none;
    cursor: pointer;
}
@media (max-width: 360px) {
    .zenturio-booking .booking-login-region {
        padding-right: 0;
        padding-left: 0;
    }
    .zenturio-booking .booking-login-panel {
        padding-right: 12px;
        padding-left: 12px;
    }
}
