/* View/report-style transaction modals (sell return, purchase, single
   payment view, ledger discount, etc.) — these are AJAX-loaded into a
   .view_modal/.payment_modal container that can live on many different
   parent pages (sell_return/index, contact/ledger*, contact/show,
   purchase/index, ...), so unlike product.css/contact.css this is loaded
   globally rather than per-page. Mirrors the same reskin pattern already
   used by .product-tailwind-modal / .contact-tailwind-modal: keep every
   functionally-required Bootstrap class (modal, modal-dialog, modal-content,
   modal-header/body/footer, data-dismiss) intact for the existing Bootstrap
   JS modal engine, and only ADD these scoped classes for the visual reskin. */

.report-tailwind-modal .report-modal-dialog {
    width: auto;
    max-width: 64rem;
    margin: 2rem auto;
    padding: 0 1rem;
}

.report-tailwind-modal .report-modal-panel {
    overflow: hidden;
    border: 1px solid #e3e8ef;
    border-radius: 0.875rem;
    background: #fff;
    box-shadow: 0 24px 48px rgba(16, 24, 40, 0.2);
}

.report-tailwind-modal .report-modal-header,
.report-tailwind-modal .report-modal-footer {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
}

.report-tailwind-modal .report-modal-header {
    justify-content: space-between;
    border-bottom: 1px solid #e3e8ef;
}

.report-tailwind-modal .report-modal-header .modal-title {
    text-align: left;
    flex: 1 1 auto;
    margin: 0;
    color: #121926;
    font-size: 1.125rem;
    font-weight: 600;
}

.report-tailwind-modal .report-modal-body {
    padding: 1.25rem;
}

.report-tailwind-modal .report-modal-footer {
    justify-content: flex-end;
    gap: 0.625rem;
    border-top: 1px solid #e3e8ef;
    background: #f8fafc;
}

.report-tailwind-modal .report-modal-close {
    display: inline-flex;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #697586;
    font-size: 0.85rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.report-tailwind-modal .report-modal-close:hover,
.report-tailwind-modal .report-modal-close:focus {
    background: #eef2f6;
    color: #121926;
    outline: none;
}

/* Info cards (supplier/business/meta address blocks) */
.report-tailwind-modal .report-modal-section-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #697586;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.report-tailwind-modal address {
    color: #364152;
    font-size: 0.875rem;
    line-height: 1.6;
}

.report-tailwind-modal .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.report-tailwind-modal .row > [class^="col-"] {
    padding: 0 0.5rem;
}

/* Line-items / payments tables */
.report-tailwind-modal table.table,
.report-tailwind-modal table.bg-gray {
    width: 100%;
    background: transparent;
}

/* Base cell padding — applies whether or not the table uses
   thead/tbody wrappers (the totals table in purchase show_details.blade.php
   uses bare <tr> rows with no thead/tbody at all). */
.report-tailwind-modal table.table th,
.report-tailwind-modal table.table td,
.report-tailwind-modal table.bg-gray th,
.report-tailwind-modal table.bg-gray td {
    border-top: 1px solid #eef2f6;
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
}

.report-tailwind-modal table.table thead th,
.report-tailwind-modal table.bg-gray thead th,
.report-tailwind-modal table.bg-gray tr.bg-green th {
    border: 0;
    border-bottom: 1px solid #cdd5df;
    background: #f8fafc;
    color: #364152;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.report-tailwind-modal .well {
    border: 1px solid #e3e8ef;
    border-radius: 0.625rem;
    background: #f8fafc;
    box-shadow: none;
}

/* Forms (add/edit payment, etc.): restyle the existing Bootstrap
   form-group/input-group markup in place, mirroring the same treatment
   used by .contact-tailwind-modal, since these forms share select2/
   datetimepicker/cash-denomination JS hooks that key off the Bootstrap
   classes. */
.report-tailwind-modal .form-group {
    margin-bottom: 1.1rem;
}

.report-tailwind-modal label {
    color: #364152;
    font-size: 0.875rem;
    font-weight: 600;
}

.report-tailwind-modal .form-control {
    min-height: 2.625rem;
    border: 1px solid #cdd5df;
    border-radius: 0.5rem;
    background: #fff;
    color: #121926;
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
    box-shadow: none;
}

.report-tailwind-modal .form-control:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--ui-focus-ring);
}

.report-tailwind-modal .input-group-addon {
    border: 1px solid #cdd5df;
    border-right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
    background: #f8fafc;
    color: #4b5565;
}
