/* Protrip's shape over Able Pro — loaded right after style-preset.css on every layout (app, auth, public, landing, errors).
   Buttons are rounded rectangles, not pills (Marex, 2026-10-09): this Able Pro build ships 20 / 15 / 26 px, which made
   every button a pill beside 8 px fields and 12 px cards. Pills stay for what isn't a button: badges, chips, status
   and filter pills (.rounded-pill), and round icon buttons. */
.btn, .introjs-tooltip .introjs-button { --bs-btn-border-radius: 10px; }
.btn-sm, .btn-group-sm > .btn { --bs-btn-border-radius: 8px; }
.btn-lg, .btn-group-lg > .btn { --bs-btn-border-radius: 14px; }
/* an icon tile never gives up width to the text beside it (Home's Departures / Need attention tiles squashed, 2026-11-09) */
.avtar, .pt-banner-icon, .pt-more-icon { flex-shrink: 0; }

/* `hidden` hides, whatever display class the element also has (2026-10-23). Able Pro scopes its d-* utilities under
   [data-pc-direction], which outweighs the theme's own [hidden] rule: the booking timer's time-up warning showed as an
   empty orange box on every booking page, and the client picker's "chosen" box never went away when cleared. */
[data-pc-direction] [hidden] { display: none !important; }

/* Phones: everything a finger presses is at least 32 px — 36–44 px where there is room (design/MOBILE.md rule 6, the
   mobile sweep, 2026-11-09). One place for the small controls every page shares; a page's own controls go in its view.
   The extra height of an inline control (a reference, its copy button, a link in a table card) is padding taken back by
   a negative margin: the tap area grows, the line doesn't move. */
@media (max-width: 767.98px) {
    [data-pc-direction] .btn-sm, [data-pc-direction] .btn-group-sm > .btn { min-height: 36px; min-width: 36px; }
    [data-pc-direction] .pt-ref-copy { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; margin: -.7rem -.4rem; vertical-align: middle; }
    [data-pc-direction] .pt-ref-code { display: inline-block; padding-block: .45rem; margin-block: -.45rem; }
    [data-pc-direction] table.pt-stacked td a:not(.btn) { display: inline-block; padding-block: .55rem; margin-block: -.55rem; }
    /* borderless link buttons (the reservation's Change agent pen, its Invoices and payments link): Bootstrap's p-0 is
       !important, so the tap area grows by min-size and a negative margin takes the line back (2026-11-13) */
    [data-pc-direction] .pt-tap-link { display: inline-block; padding-block: .45rem; margin-block: -.45rem; max-width: 100%; }
    [data-pc-direction] .btn.btn-link.p-0 { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; margin-block: -.3rem; }
    /* badges: never under 11 px (Able Pro's .75em is 10.5 px, and 8.4 px inside small text) */
    [data-pc-direction] .badge { font-size: max(.75em, 11px); }
    [data-pc-direction] .form-switch .form-check-input { width: 3.25rem; height: 2rem; margin-top: -.2rem; }
    [data-pc-direction] .form-switch { padding-left: 3.85rem; }
    [data-pc-direction] .form-switch .form-check-input { margin-left: -3.85rem; }
    /* checkboxes and radios at 24 px (WCAG 2.5.8's minimum); their label is tappable too */
    [data-pc-direction] .form-check:not(.form-switch) { padding-left: 2.1rem; }
    [data-pc-direction] .form-check:not(.form-switch) > .form-check-input { width: 1.5rem; height: 1.5rem; margin-left: -2.1rem; margin-top: -.1rem; }
    [data-pc-direction] .fc .fc-button { min-height: 36px; }
    [data-pc-direction] .cal-pill { min-height: 36px; }
    [data-pc-direction] .glance-item { padding-block: .5rem; }
    [data-pc-direction] .hdr-brand { min-width: 40px; min-height: 40px; }
}

/* Tablets (768 px up to where the full menu fits — fitNav() in the layout sets .is-compact): the top menu keeps its
   labels, small under each icon like the phone's tab bar, instead of a row of unlabelled icons (mobile sweep,
   2026-11-09). The caret goes; a section with pages still opens its dropdown. */
[data-pc-direction] .topbar-nav.is-compact .tn-list > .tn-item > .tn-link { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 8px;
    font-size: 11.5px; line-height: 1.1; min-width: 0; max-width: 100%; }
[data-pc-direction] .topbar-nav.is-compact .tn-list > .tn-item > .tn-link > .tn-text { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
[data-pc-direction] .topbar-nav.is-compact .tn-list > .tn-item > .tn-link > .tn-caret { display: none; }
[data-pc-direction] .topbar-nav.is-compact .tn-list > .tn-item > .tn-link > .tn-icon { font-size: 17px; }

/* Phones, edge to edge (Marex's mockups, 2026-11-09: "remove as much padding and margins as possible and use the
   screen's full width"): the page has no side padding; top-level cards and banners run the full width with square
   sides and a 10 px gap; their insides keep a 16 px inset. Grid rows outside a card drop their gutter (they would
   stick out of a page without padding); rows inside a card keep theirs. Nested cards (chat, e-mail panes) are left alone. */
@media (max-width: 767.98px) {
    [data-pc-direction] .pc-container .pc-content { padding: 0 0 12px !important; }
    /* no footer on a phone (Marex, 2026-11-09): the tab bar ends the screen */
    [data-pc-direction] .pc-footer { display: none !important; }
    [data-pc-direction] .pc-content .row:not(.card .row):not(.modal .row):not(.offcanvas .row) { --bs-gutter-x: 0px; --bs-gutter-y: 10px; margin-inline: 0; }
    [data-pc-direction] .pc-content .card:not(.card .card):not(.modal .card) { --bs-card-border-radius: 0; --bs-card-inner-border-radius: 0; border-radius: 0 !important;
        border-left: 0; border-right: 0; margin-bottom: 10px; box-shadow: none; }
    [data-pc-direction] .pc-content .card:not(.card .card):not(.modal .card) > .card-body { padding: 16px; }
    [data-pc-direction] .pc-content .card:not(.card .card):not(.modal .card) > .card-header { padding-inline: 16px; }
    [data-pc-direction] .pc-content .pt-banner { border-radius: 0 !important; margin: 0 0 10px !important; padding: 18px 16px; box-shadow: none; }
    /* what sits straight on the page (a breadcrumb, a note, a heading) keeps the 16 px inset */
    [data-pc-direction] .pc-content > .page-header, [data-pc-direction] .pc-content > .alert,
    [data-pc-direction] .pc-content > h1, [data-pc-direction] .pc-content > h2, [data-pc-direction] .pc-content > h3, [data-pc-direction] .pc-content > h4,
    [data-pc-direction] .pc-content > h5, [data-pc-direction] .pc-content > p,
    [data-pc-direction] .pc-content > .d-flex, [data-pc-direction] .pc-content > form:not(.card) > .d-flex { margin-inline: 16px; }
    [data-pc-direction] .pc-content > .d-flex:first-child { margin-top: 10px; }
    [data-pc-direction] .pc-content > .alert { margin-top: 10px; }
}

/* Phones: the bell is an app screen (memory phone-app-design) — a title bar with icon actions, the two tabs as a segmented
   switch, each kind of news a section label, each notification a row (icon tile · title · two lines · when · unread dot);
   a tap on the row opens it (the Open link is stretched over the row). */
@media (max-width: 767.98px) {
    #bell-panel.offcanvas { width: 100% !important; border: 0 !important; }
    #bell-panel .offcanvas-header { gap: 2px; padding: 10px 6px 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--bs-border-color); }
    #bell-panel .offcanvas-title { font-size: 22px; font-weight: 800; margin-right: auto; }
    #bell-panel .offcanvas-header > .btn { width: 40px; height: 40px; padding: 0; margin: 0 !important; font-size: 0; border-radius: 50%;
        display: inline-flex; align-items: center; justify-content: center; background: none !important; border: 0 !important; color: var(--bs-body-color) !important; }
    #bell-panel .offcanvas-header > .btn > i { font-size: 18px; margin: 0 !important; }
    #bell-panel .offcanvas-header > [data-bell-compose] { color: var(--bs-primary) !important; }
    #bell-panel .offcanvas-header > .btn-close { width: 40px; height: 40px; margin: 0; padding: 0; background-size: 14px; }
    #bell-panel .offcanvas-body { padding: 0 0 calc(16px + env(safe-area-inset-bottom)); }
    #bell-panel [data-desk-offer] { margin: 10px 14px !important; }
    /* the tabs */
    #bell-panel .offcanvas-body > .card:has(.profile-tabs) { background: none; border: 0; box-shadow: none; margin: 10px 14px !important; }
    #bell-panel .offcanvas-body > .card > .card-body:has(> .profile-tabs) { padding: 0 !important; }
    #bell-panel .profile-tabs { display: flex; flex-wrap: nowrap; gap: 3px; padding: 3px; background: var(--bs-tertiary-bg); border-radius: 12px; border: 0; }
    #bell-panel .profile-tabs .nav-item { flex: 1 1 0; min-width: 0; }
    #bell-panel .profile-tabs .nav-link { width: 100%; justify-content: center; margin: 0 !important; padding: 8px 4px !important; border: 0 !important; border-radius: 9px !important;
        font-size: 13px; font-weight: 600; color: var(--bs-secondary-color); white-space: nowrap; }
    #bell-panel .profile-tabs .nav-link > i { margin-right: 6px !important; }
    #bell-panel .profile-tabs .nav-link.active { background: var(--bs-card-bg) !important; color: var(--bs-heading-color) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
    #bell-panel .profile-tabs .nav-link::after { display: none !important; }
    /* the groups: section labels */
    #bell-panel .bell-group { margin: 0; }
    #bell-panel .bell-group-head { min-height: 44px; padding: 14px 14px 6px; border-radius: 0; background: none !important; }
    #bell-panel .bell-group-icon { width: auto; height: auto; background: none !important; font-size: 14px; }
    #bell-panel .bell-group-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); }
    #bell-panel .bell-group-body { padding: 0; border-top: 1px solid var(--bs-border-color); }
    #bell-panel .bell-group-body > .text-end { position: absolute; right: 52px; top: 6px; margin: 0 !important; }
    #bell-panel .bell-group { position: relative; }
    #bell-panel .bell-group-body > .text-end .btn { font-size: 0; width: 36px; height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
    #bell-panel .bell-group-body > .text-end .btn > i { font-size: 16px; margin: 0 !important; }
    #bell-panel .offcanvas-body .text-span { margin: 14px 14px 6px !important; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); }
    /* a notification: a row */
    #bell-panel .bell-item { margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--bs-border-color) !important; border-radius: 0 !important; box-shadow: none !important; position: relative; }
    #bell-panel .bell-item:active { background: rgba(var(--bs-secondary-rgb), .08) !important; }
    #bell-panel .bell-item > .card-body { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 12px 10px 12px 14px;
        grid-template-areas: "icon title dot" "icon body dot" "icon meta dot"; align-items: start; }
    #bell-panel .bell-item > .card-body > div:first-child { display: contents !important; }
    #bell-panel .bell-item .card-body > div:first-child > .badge { grid-area: icon; width: 40px; height: 40px; border-radius: 12px; font-size: 17px !important; display: flex; align-items: center; justify-content: center; padding: 0; }
    #bell-panel .bell-item .card-body > div:first-child > .badge > i { margin: 0 !important; }
    #bell-panel .bell-item .card-body > div:first-child > p { grid-area: meta; font-size: 12px !important; margin-top: 2px !important; }
    #bell-panel .bell-item .card-body > div:first-child > .bell-dot { grid-area: dot; position: relative; z-index: 2; width: 36px; height: 36px; margin: -6px 0 0 !important; display: flex; align-items: center; justify-content: center; }
    #bell-panel .bell-item .card-body > h6 { grid-area: title; font-size: 14.5px; font-weight: 700; margin: 0 !important; line-height: 1.3; }
    #bell-panel .bell-item.is-read .card-body > h6 { font-weight: 600; }
    #bell-panel .bell-item .card-body > p, #bell-panel .bell-item .card-body > img { grid-column: 2 / 3; margin: 0 !important; }
    #bell-panel .bell-item .card-body > p.small { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important; font-size: 13px !important; }
    #bell-panel .bell-item .card-body > img { max-height: 140px; object-fit: cover; margin-top: 6px !important; }
    #bell-panel .bell-item .card-body > .d-grid { position: static; }
    #bell-panel .bell-item .card-body > .d-grid > a { position: absolute; inset: 0; z-index: 1; opacity: 0; border: 0; }
    #bell-panel .bell-item.bell-tinted { border-left: 4px solid var(--nt) !important; }
}

/* Phones: dialogs are bottom sheets (memory phone-app-design) — full width from the bottom edge, rounded top, a grab
   handle, the content scrolling inside, buttons a thumb's size; a tap above the sheet or a swipe down closes it
   (public/js/protrip-sheets.js). The document viewer and full-screen dialogs (e-mail's New message) stay as they are. */
@media (max-width: 767.98px) {
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) {
        margin: 0 !important; width: 100% !important; max-width: none !important; height: 100% !important; min-height: 100% !important;
        display: flex !important; flex-direction: column; justify-content: flex-end; align-items: stretch !important;
    }
    .modal.fade:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) {
        transform: translateY(100%) !important; opacity: 1 !important; transition: transform .3s cubic-bezier(.2, .8, .2, 1) !important;
    }
    .modal.fade.show:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) { transform: translateY(var(--pt-sheet-drag, 0px)) !important; }
    .modal.pt-sheet-dragging .modal-dialog { transition: none !important; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) > .modal-content {
        width: 100%; max-height: calc(100% - 28px - env(safe-area-inset-top)); border: 0; border-radius: 20px 20px 0 0 !important;
        display: flex; flex-direction: column; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
    }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) > .modal-content::before {
        content: ''; flex: 0 0 auto; display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(var(--bs-secondary-rgb), .35);
    }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) > .modal-content > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-header { padding: 8px 16px 10px; border-bottom: 0; touch-action: none; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-title { font-size: 18px; font-weight: 800; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-body { padding: 4px 16px 12px; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-footer { padding: 10px 16px 12px; gap: 8px; flex-wrap: nowrap; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-footer > * { margin: 0; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-footer > .btn { flex: 1 1 0; min-height: 46px; }
    .modal:not(.doc-viewer) .modal-dialog:not(.modal-fullscreen-sm-down) .modal-footer .btn { min-height: 44px; }
}

/* Phones: the builders (offer, invoice, reservation — memory phone-app-design, thumb first): the main buttons in a bar
   fixed to the bottom edge above the tab bar, a reservation's service types one row of chips, an offer's options as
   compact rows. `.pt-phone-actions` makes any button row such a bar. */
@media (max-width: 767.98px) {
    .pt-phone-actions, form[data-builder] .rb-side > button[type="submit"] {
        position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 1034; margin: 0 !important; width: auto !important;
        padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)) !important;
        background: #fff; border-top: 1px solid var(--bs-border-color); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
    [data-pc-theme="dark"] .pt-phone-actions { background: #1f1f1f; }
    .pt-phone-actions { display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; }
    .pt-phone-actions > .btn { flex: 1 1 auto; min-height: 46px; padding-inline: 8px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
    .pt-phone-actions > a.btn:first-child { flex: 0 0 46px; font-size: 0; padding: 0; }
    .pt-phone-actions > a.btn:first-child::before { content: '\00d7'; font-size: 26px; line-height: 1; }
    form[data-builder] .rb-side > button[type="submit"] { border-radius: 0; min-height: 66px; font-size: 16px; font-weight: 600; background: var(--bs-primary) !important; color: #fff !important; border: 0; box-shadow: 0 -4px 16px rgba(0, 0, 0, .1); }
    body:has(.pt-phone-actions) .pc-container, body:has(form[data-builder]) .pc-container { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
    body.pt-typing .pt-phone-actions, body.pt-typing form[data-builder] .rb-side > button[type="submit"] { position: static; box-shadow: none; }
    /* a reservation's service types: one row that scrolls sideways */
    form[data-builder] .rb-item-head > .d-flex { min-width: 0; flex: 1 1 auto; }
    form[data-builder] .rb-item-head [role="group"] { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; min-width: 0; }
    form[data-builder] .rb-item-head [role="group"]::-webkit-scrollbar { display: none; }
    form[data-builder] .rb-item-head [role="group"] > .btn { white-space: nowrap; flex: 0 0 auto; min-height: 36px; border-radius: 999px; }
    /* an offer's options: photo tile beside the text */
    .prop-offer { grid-template-columns: 72px minmax(0, 1fr) !important; gap: 12px !important; }
    .prop-offer .prop-photo { width: 72px !important; height: 72px !important; }
}
