/*
 * Print styles for the public order pages (New theme).
 * Loaded with media="print" after Bootstrap, see the theme layout.
 * Main target: the last step of the order form (RealOrders/confirmation),
 * which clients print to report the trip to their company, and the order
 * page in "My Orders" (RealOrders/view) with the same panels.
 */

@page {
    margin: 12mm;
}

/* Layout reset: a flex body and overflow:hidden break page splitting */
html,
body {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
}
body {
    font-size: 12px;
}
#container,
#container .page_content,
#container .step_wrap,
#container .order_page {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* No URLs after links (Bootstrap print rule) */
a[href]:after,
abbr[title]:after {
    content: none !important;
}

/* Screen-only elements */
.no_print,
#header,
.mobile_menu,
.menu_wrap,
.login_panel,
.order_progress,
#ss_gmo_globalsign_secured_site_seal,
#footer,
.statcounter,
#debug-kit-toolbar {
    display: none !important;
}

/* Print-only elements */
.print_only {
    display: block !important;
}

/* Print header: logo, contacts, order number */
.print_header {
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.print_header__top {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.print_header__logo {
    max-width: 150px !important;
}
.print_header__contacts {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}
.print_header__title {
    margin: 8px 0 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.print_header__date {
    margin: 2px 0 0;
    font-size: 12px;
}

/* Reservation panels: RealOrders/confirmation and RealOrders/view (classes: Elements/reservation_details.ctp) */
#container .cnf-page {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px;
}
.cnf-page .print_header {
    margin-bottom: 10px;
}
/* Order number and date are already in .print_header, total is in the price breakdown */
.cnf-success,
.cnf-heading,
.cnf-actions {
    display: none !important;
}
.cnf-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) !important;
    gap: 10px 14px !important;
}
.cnf-stack {
    gap: 10px !important;
}

/* Panels: borders instead of backgrounds (Bootstrap removes backgrounds in print) */
.cnf-panel {
    padding: 8px 12px !important;
    border: 1px solid #999 !important;
    border-radius: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
}
.cnf-panel h2 {
    margin: 0 0 4px !important;
    font-size: 14px !important;
}
.cnf-field,
.cnf-route {
    margin-top: 4px !important;
    padding: 3px 0 !important;
    border-radius: 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
}
.cnf-two {
    gap: 4px 10px !important;
    margin-top: 4px !important;
}
.cnf-two .cnf-field {
    margin-top: 0 !important;
}
.cnf-field-label {
    margin: 0 !important;
    font-size: 9px !important;
}
.cnf-field strong,
.cnf-route-point strong {
    font-size: 12px !important;
}
.cnf-route-point p {
    margin: 0 !important;
    font-size: 11px !important;
}
.cnf-marker {
    border: 2px solid #000 !important;
}
.cnf-marker--filled {
    background: #000 !important;
}
.cnf-route-line {
    height: 12px !important;
    border-left: 1px solid #000 !important;
}
.cnf-vehicle {
    min-height: 0 !important;
}
.cnf-vehicle p {
    margin: 0 !important;
    font-size: 11px !important;
}
.cnf-vehicle img {
    width: auto !important;
    max-width: 45% !important;
    height: auto !important;
    max-height: 70px !important;
}
.cnf-price-row {
    margin-top: 2px !important;
    padding: 2px 0 !important;
    border-bottom: 1px solid #ddd !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    break-inside: avoid;
    page-break-inside: avoid;
}
.cnf-price-total {
    margin-top: 6px !important;
    padding: 6px 0 0 !important;
    border-top: 2px solid #000 !important;
    font-size: 14px !important;
}
