@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-image: url('../img/pricify.svg');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 25%;
    background-position: center calc(100% - 2rem);
}

th {
    font-weight: 400;
    white-space: nowrap;
    background-color: var(--bs-tertiary-bg) !important;
}

tr.dirty-row,
tr.dirty-row *:not(.modal):not(:is(.modal *)):not(.modal-backdrop):not(input[type=checkbox]):not(button):not(select):not(ul):not(option):not(.dropdown):not(:is(.dropdown *)):not(.is-invalid):not(:is(.is-invalid *)) {
    background-color: #fff3cd !important;
    background: #fff3cd !important;
}

tr.dirty-row select:not(.modal select) {
    background-color: #fff3cd !important;
}

tr.dirty-row select option {
    background-color: #fff !important;
}

tr.dirty-row span:not(:has(button)) {
    border-color: #fff3cd !important;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #f68b00;
}

.btn-primary {
    color: #fff;
    background-color: #f68b00;
    border-color: #f68b00;
}

.content {
    padding-top: 0.5rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    box-shadow: inset 0 0 0 1px red;
}

.validation-message {
    color: red;
}

.validation-errors li:empty {
    display: none;
}

.validation-errors:empty,
ul.validation-errors:not(:has(li:not(:empty))) {
    display: none;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3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kuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2IDY2LjA1ODMgMjYzLjU4NiA2Ni4wNTQ392TS45NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODc7IDg5Ljc5MjEgMjY3LjM4NyA4Ny4zMDA1IDI2Ni4xMTYgODYuMDU0NyAyNjMuNTc2IDg2LjA1NDd6IiBmaWxsPSIjRkZFNTAwIiBmaWxsLW9wYWNpdHk9ImNoYW5nZSg0NSwgMCwgMTYwMCwgMSkiLz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.center {
    position: absolute;
    margin: auto;
    left: 50%;
    top: 25%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.margin-left-none {
    margin-left: 0px !important;
}

.fixed-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.accordion-button {
    background-color: var(--bs-tertiary-bg) !important;
}

.accordion-button {
    border: 1px solid #f68b00 !important;
}

.accordion-button.collapsed {
    border-bottom: 0 !important;
}


.fixed-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    height: 32px;
    box-sizing: border-box;
    padding: 0.3rem 0.5rem;
    border: 1px solid #ced4da;
    display: inline-block;
    background: #fff;
    vertical-align: middle;
    font-size: 0.8125rem;
}

.fixed-cell-date {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    height: 32px;
    box-sizing: border-box;
    padding: 0.3rem 0.5rem;
    border: 1px solid #ced4da;
    display: inline-block;
    background: #fff;
    vertical-align: middle;
    font-size: 0.8125rem;
}
.fixed-cell-140 {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    height: 36px;
    box-sizing: border-box;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    display: inline-block;
    background: #fff;
    vertical-align: middle;
    font-size: 0.875rem; /* Bootstrap .form-control-sm */
}

.editable-component:hover {
    background-color: #fdf3e3; /* subtle orange tint on hover */
    border: 1px solid #f68b00; /* orange border to emphasize the element */
}

.font-small {
    font-size: 0.875rem;
}

.dropdown-width {
    width: 180px;
    min-width: 140px;
    max-width: 200px;
}

.override-width350 {
    width: 350px !important;
    min-width: 350px !important;
    max-width: 350px !important;
}

.uppercase {
    text-transform: uppercase;
}

.form-check-input:disabled {
    background-color: lightgray;
}

span.input-disabled {
    background-color: rgb(235,235,235);
}

select.form-select {
    height: 32px;
}


/* =============================================================
   PRICIFY THEME OVERRIDES
   Compact layout · Orange #f68b00 accent · 13 px base font
   ============================================================= */

/* ── Bootstrap CSS variable overrides ─────────────────────── */
:root {
    --bs-primary: #f68b00;
    --bs-primary-rgb: 246, 139, 0;
    --bs-link-color: #f68b00;
    --bs-link-color-rgb: 246, 139, 0;
    --bs-link-hover-color: #c46d00;
    --bs-link-hover-color-rgb: 196, 109, 0;
    --bs-primary-border-subtle: rgba(246, 139, 0, 0.4);
    --bs-body-font-size: 0.8125rem; /* 13 px */
    --bs-table-cell-padding-y: 0.15rem;
    --bs-table-cell-padding-x: 0.4rem;
    --bs-btn-padding-y: 0.3rem;
    --bs-btn-padding-x: 0.6rem;
    --bs-btn-font-size: 0.8125rem;
    --bs-input-btn-padding-y: 0.3rem;
    --bs-input-btn-padding-x: 0.5rem;
    --bs-input-btn-font-size: 0.8125rem;
    --bs-accordion-btn-active-color: #3d2800;
    --bs-accordion-active-bg: var(--bs-tertiary-bg);
}

/* ── Primary button states ───────────────────────────────── */
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background-color: #c46d00;
    border-color: #b36400;
}

.btn-primary:focus,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(246, 139, 0, 0.35);
}

/* ── Outline-primary button ──────────────────────────────── */
.btn-outline-primary {
    color: #f68b00;
    border-color: #f68b00;
}

.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: #f68b00;
    border-color: #f68b00;
    color: #fff;
}

/* ── Form controls — compact + orange focus ──────────────── */
.form-control,
.form-select {
    font-size: 0.8125rem;
}

.form-control {
    padding: 0.3rem 0.5rem;
}

.form-select {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    padding-left: 0.5rem;
    /* preserve Bootstrap's 2.25rem right padding to keep space for the dropdown arrow */
}

.form-control:focus,
.form-select:focus {
    border-color: #f68b00;
    box-shadow: 0 0 0 0.2rem rgba(246, 139, 0, 0.25);
}

.form-label,
label {
    font-size: 0.8125rem;
    margin-bottom: 0.2rem;
}

.input-group-text {
    padding: 0.3rem 0.5rem;
    font-size: 0.8125rem;
}

/* ── Checkboxes & radios ─────────────────────────────────── */
.form-check-input:checked {
    background-color: #f68b00;
    border-color: #f68b00;
}

.form-check-input:focus {
    border-color: #f68b00;
    box-shadow: 0 0 0 0.2rem rgba(246, 139, 0, 0.25);
}

/* ── Tables — compact ────────────────────────────────────── */
.table {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.table td {
    vertical-align: middle;
}

/* ── Form label alignment (used in search table rows) ────── */
.col-form-label,
.col-form-label-sm,
.col-form-label-lg {
    padding-top: 0;
    padding-bottom: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* ── Cards — tighter padding ─────────────────────────────── */
.card-body {
    padding: 0.75rem;
}

.card-header,
.card-footer {
    padding: 0.4rem 0.75rem;
}

/* ── Modals — compact padding ────────────────────────────── */
.modal-header {
    padding: 0.65rem 1rem;
}

.modal-body {
    padding: 0.75rem 1rem;
}

.modal-footer {
    padding: 0.5rem 1rem;
}

/* ── Navbar — compact + orange active link ───────────────── */
.navbar {
    padding-top:    0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.8125rem;
}

.navbar .nav-link {
    padding-top:    0.3rem;
    padding-bottom: 0.3rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #f68b00 !important;
}

.navbar .btn {
    padding: 0.15rem 0.55rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* ── All buttons — match navbar button size globally ─────── */
.btn {
    padding: 0.15rem 0.55rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.btn-sm {
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.btn-lg {
    padding: 0.3rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.navbar-brand {
    color: #444 !important;
    font-weight: 600;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #f68b00;
    color: #fff;
}

/* ── Accordion ───────────────────────────────────────────── */
.accordion-button:focus {
    border-color: #f68b00;
    box-shadow: 0 0 0 0.2rem rgba(246, 139, 0, 0.25);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge.bg-primary {
    background-color: #f68b00 !important;
}

/* ── Pagination ──────────────────────────────────────────── */
.page-link {
    color: #f68b00;
}

.page-link:hover {
    color: #c46d00;
}

.page-item.active .page-link {
    background-color: #f68b00;
    border-color: #f68b00;
    color: #fff;
}

.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(246, 139, 0, 0.25);
}


/* =============================================================
   CRISPNESS OVERRIDES
   Tighten spacing, headings, accordion, and utilities
   ============================================================= */

/* ── Root font scale — shifts ALL rem-based sizing down ─────── */
html {
    font-size: 16px;
}

/* ── Headings ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-weight: 500;
    color: #444;
}

h1, .h1 { font-size: 1.5rem; }
h2, .h2 { font-size: 1.3rem; }
h3, .h3 { font-size: 1.15rem; }
h4, .h4 { font-size: 1.05rem; }
h5, .h5 { font-size: 0.95rem; }
h6, .h6 { font-size: 0.875rem; }

/* ── Accordion — crisp compact header ────────────────────── */
.accordion {
    --bs-accordion-border-width: 0;
}

.accordion,
.accordion-item,
.accordion-button,
.accordion-button:not(.collapsed) {
    border-radius: 0 !important;
}

.accordion-button {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500;
    color: #555;
}

.accordion-body {
    padding: 0.5rem 0.75rem;
}

/* ── Bootstrap spacing utilities — tighter ───────────────── */
.mb-1 { margin-bottom: 0.15rem !important; }
.mb-2 { margin-bottom: 0.3rem !important; }
.mb-3 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 0.75rem !important; }

.mt-1 { margin-top: 0.15rem !important; }
.mt-2 { margin-top: 0.3rem !important; }
.mt-3 { margin-top: 0.5rem !important; }
.mt-4 { margin-top: 0.75rem !important; }

.my-1 { margin-top: 0.15rem !important; margin-bottom: 0.15rem !important; }
.my-2 { margin-top: 0.3rem !important;  margin-bottom: 0.3rem !important; }
.my-3 { margin-top: 0.5rem !important;  margin-bottom: 0.5rem !important; }

.pb-1 { padding-bottom: 0.15rem !important; }
.pb-2 { padding-bottom: 0.3rem !important; }
.pb-3 { padding-bottom: 0.5rem !important; }

.pt-1 { padding-top: 0.15rem !important; }
.pt-2 { padding-top: 0.3rem !important; }
.pt-3 { padding-top: 0.5rem !important; }

.py-1 { padding-top: 0.15rem !important; padding-bottom: 0.15rem !important; }
.py-2 { padding-top: 0.3rem !important;  padding-bottom: 0.3rem !important; }
.py-3 { padding-top: 0.5rem !important;  padding-bottom: 0.5rem !important; }

.p-1  { padding: 0.15rem !important; }
.p-2  { padding: 0.3rem !important; }
.p-3  { padding: 0.5rem !important; }

/* ── Row gutters ─────────────────────────────────────────── */
.row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0; /* keep Bootstrap default — form rows mustn't add vertical gaps */
}

/* ── Dropdown menu ───────────────────────────────────────── */
.dropdown-menu {
    font-size: 0.8125rem;
    padding: 0.2rem 0;
}

.dropdown-item {
    padding: 0.25rem 0.75rem;
}

/* ── Navbar brand — scale to match new font root ─────────── */
.navbar-brand {
    font-size: 1rem !important;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

/* ── Pagination — compact ────────────────────────────────── */
.page-link {
    padding: 0.2rem 0.55rem;
    font-size: 0.8125rem;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    font-size: 0.75rem;
}

/* ── Modal — top-aligned ─────────────────────────────────── */
.modal-dialog-top {
    margin-top: 3rem;
    align-self: flex-start;
}

/* ── Tooltips — orange theme ─────────────────────────────── */
.tooltip {
    --bs-tooltip-opacity: 1;
}

.tooltip .tooltip-inner {
    background-color: #f68b00;
    color: #fff;
    font-size: 0.8125rem;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
    border-top-color: #f68b00;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
    border-bottom-color: #f68b00;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before {
    border-left-color: #f68b00;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before {
    border-right-color: #f68b00;
}

.pr-fix {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.pr-fix::after {
    content: "";
    display: inline-block;
    width: 1rem;      /* same as pr-3 */
}

