/*
 * Loading gate for the Edit Trip modal.
 *
 * The modal renders its tabs immediately but fills them from AJAX a moment
 * later. Saving before that lands posts empty repeaters and wipes the trip's
 * stops, contacts, cargo and vehicle assignments — so the body is covered and
 * Save is held until the data is in.
 */

.trip-form-gate {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    text-align: center;
}

.trip-form-gate__message {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}

.trip-form-gate--failed .trip-form-gate__message {
    color: #d9534f;
    font-weight: bold;
    max-width: 320px;
}

/* The modal body is the positioning context for the overlay. */
.modal-body.trip-form-gate-host {
    position: relative;
}

/* Save stays visibly out of reach until the form is ready. */
.trip-form-gate-host ~ .modal-footer .btn[disabled],
.modal-footer .btn.trip-form-gate-locked {
    opacity: .5;
    cursor: not-allowed;
}
