/* Custom styles for Statzer Transportation */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom form styles */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Table responsive wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Print helpers (screen) */
.print-only {
    display: none !important;
}

.print-full {
    display: none !important;
}

/* Print styles — landscape reports that fit full table data */
@page {
    size: letter landscape;
    margin: 0.35in;
}

@media print {
    .no-print,
    nav,
    .admin-nav,
    footer,
    .admin-pagination,
    form[data-search-form],
    .bg-white.rounded-lg.shadow-lg.p-6.mb-6 form {
        display: none !important;
    }

    .print-only {
        display: revert !important;
    }

    h1.print-only {
        display: block !important;
        font-size: 14pt !important;
        margin: 0 0 8pt 0 !important;
        color: #000 !important;
    }

    /* Prefer full cell text over screen truncations */
    .truncate-screen {
        display: none !important;
    }

    .print-full {
        display: inline !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 8.5pt !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body {
        min-height: 0 !important;
        display: block !important;
    }

    main,
    .print-area,
    .container,
    .container.mx-auto {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .shadow,
    .shadow-lg,
    .rounded-lg,
    .rounded-md,
    .bg-white {
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    /* Stop scroll wrappers from clipping printed tables */
    .overflow-x-auto,
    div[class*="overflow"] {
        overflow: visible !important;
        max-width: none !important;
        width: 100% !important;
    }

    table,
    table tbody,
    table tr,
    table td,
    table th {
        position: static !important;
    }

    .print-table,
    table.print-table,
    table[data-sortable].print-table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    .print-table thead {
        display: table-header-group;
        background: #e5e7eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
        box-shadow: none !important;
        background: transparent !important;
        color: #000 !important;
    }

    .print-table th,
    .print-table td {
        border: 1px solid #999 !important;
        padding: 3px 4px !important;
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: anywhere !important;
        overflow: visible !important;
        max-width: none !important;
        min-width: 0 !important;
        font-size: 8pt !important;
        line-height: 1.25 !important;
        vertical-align: top !important;
    }

    .print-table th {
        font-weight: 700 !important;
        background: #e5e7eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Reasonable column shares for trip/request reports */
    .print-table .col-id { width: 6%; }
    .print-table .col-date { width: 9%; }
    .print-table .col-time { width: 7%; }
    .print-table .col-name { width: 12%; }
    .print-table .col-place { width: 18%; }
    .print-table .col-flight { width: 7%; }
    .print-table .col-driver { width: 10%; }
    .print-table .col-email { width: 14%; }

    /* Handwritten payment blanks under each trip */
    .print-table tr.print-cc-row {
        page-break-before: avoid;
        break-before: avoid;
    }

    .print-table tr:has(+ tr.print-cc-row) {
        page-break-after: avoid;
        break-after: avoid;
    }

    /* Soft join between trip data and its CC line */
    .print-table tr:has(+ tr.print-cc-row) > td {
        border-bottom-width: 1px !important;
        border-bottom-style: solid !important;
        border-bottom-color: #bbb !important;
    }

    /* ~50% taller payment row + thick separator after each trip group */
    .print-table tr.print-cc-row > td {
        padding-top: 10px !important;
        padding-bottom: 12px !important;
        min-height: 2.6em !important;
        height: 2.6em !important;
        font-size: 10pt !important;
        font-weight: 400 !important;
        line-height: 1.5 !important;
        color: #111 !important;
        vertical-align: middle !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        border-bottom-width: 3px !important;
        border-bottom-style: solid !important;
        border-bottom-color: #000 !important;
        /* Extra weight that survives border-collapse / print engines */
        box-shadow: inset 0 -3px 0 0 #000 !important;
    }

    /* Match thick rule on the next trip row top so collapse keeps it */
    .print-table tr.print-cc-row + tr > td {
        border-top-width: 3px !important;
        border-top-style: solid !important;
        border-top-color: #000 !important;
    }

    .print-table tr.print-cc-row > td.print-cc-card {
        white-space: nowrap !important;
    }

    .print-cc-card-inner {
        display: flex;
        align-items: flex-end;
        gap: 0.45em;
        width: 100%;
    }

    .print-table tr.print-cc-row .print-cc-label {
        flex: 0 0 auto;
        font-weight: 700;
        margin-right: 0.2em;
    }

    .print-table tr.print-cc-row > td.print-cc-exp-cvv {
        white-space: nowrap !important;
        text-align: left !important;
    }

    .print-cc-exp,
    .print-cc-cvv {
        display: inline-block;
        white-space: nowrap;
        vertical-align: bottom;
    }

    .print-cc-exp {
        margin-right: 1.25em;
    }

    /* Underscore runways — real characters so print never collapses blanks */
    .print-cc-write {
        display: inline;
        font-family: ui-monospace, "Courier New", Courier, monospace;
        font-weight: 400;
        letter-spacing: 0.18em;
        white-space: pre;
    }

    .print-cc-write--card {
        flex: 1 1 auto;
        letter-spacing: 0.22em;
    }

    .print-cc-write--exp {
        letter-spacing: 0.28em;
    }

    .print-cc-write--cvv {
        letter-spacing: 0.28em;
    }

    .whitespace-nowrap {
        white-space: normal !important;
    }

    select,
    button,
    input,
    textarea {
        display: none !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    a[href]::after {
        content: none !important;
    }
}

/* Fix dropdown font size and positioning */
select {
    font-size: 1.125rem !important;
    line-height: 1.75rem !important;
}

select option {
    font-size: 1.125rem !important;
    padding: 0.75rem 1rem !important;
    line-height: 1.75rem !important;
}

/* Ensure dropdown appears correctly in tables - prevent overflow clipping */
.overflow-x-auto {
    overflow-y: visible !important;
    overflow-x: auto !important;
}

/* Prevent parent containers from clipping dropdowns */
div[class*="overflow"] {
    overflow-y: visible !important;
}

table {
    position: relative !important;
}

table tbody {
    position: relative !important;
}

table tr {
    position: relative !important;
}

table td {
    position: relative !important;
    overflow: visible !important;
}

table select {
    position: relative !important;
    z-index: 100 !important;
    font-size: 1.125rem !important;
    line-height: 1.75rem !important;
    min-height: 2.75rem !important;
}

table select:focus {
    z-index: 1000 !important;
    position: relative !important;
}

/* Force larger font for dropdown options in admin tables */
table select option {
    font-size: 1.125rem !important;
    padding: 0.75rem 1rem !important;
    line-height: 1.75rem !important;
    min-height: 2.75rem !important;
}

/* Home / testimonials: horizontal review strip */
.statzer-testimonials-slider {
    scrollbar-width: thin;
    scrollbar-color: rgba(30, 58, 138, 0.35) transparent;
}

.statzer-testimonials-slider::-webkit-scrollbar {
    height: 8px;
}

.statzer-testimonials-slider::-webkit-scrollbar-track {
    background: rgba(243, 244, 246, 0.9);
    border-radius: 9999px;
}

.statzer-testimonials-slider::-webkit-scrollbar-thumb {
    background: rgba(30, 58, 138, 0.35);
    border-radius: 9999px;
}

.statzer-testimonials-slider::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 58, 138, 0.5);
}
