/* Global font size override - AutoERP theme uses px not rem */
/* html font-size drives rem-based elements (radio, checkbox, spacing) */
/* body font-size drives text */
html {
    font-size: 14px !important;
}
body {
    font-size: 14px !important;
}

/* Ensure radio buttons and checkboxes are proportional to text */
input[type="radio"],
input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
}

/* Hide salutation container (div.col-sm-3 with selectize) and expand name fields */
.field[data-name="name"] > .row > .col-sm-3:has(select[data-name^="salutation"]) {
    display: none !important;
}
.field[data-name="name"] > .row > .col-sm-4 {
    width: 50% !important;
}
.field[data-name="name"] > .row > .col-sm-5 {
    width: 50% !important;
}

/* Hide phone type dropdown in phone-number-block only (not in other input groups) */
.phone-number-block > .input-group-item:has(select[data-property-type="type"]) {
    display: none !important;
}
/* Fallback */
.phone-number-block select[data-property-type="type"],
.phone-number-block .selectize-control.radius-left {
    display: none !important;
}

/* Hide entire "Misc/Rôzne" panel and teams/defaultTeam */
.panel[data-name="misc"] {
    display: none !important;
}
.cell[data-name="teams"],
.cell[data-name="defaultTeam"] {
    display: none !important;
}

/* Product autocomplete dropdown - wider and with text wrapping */
.autocomplete-suggestions {
    min-width: 450px !important;
    max-width: 600px !important;
}
.autocomplete-suggestions .autocomplete-suggestion {
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
}

/* Quote items: selected product name should stay readable (black + bold),
   even when input is readonly after product selection. */
.field[data-name="items"] .cell[data-name="name"] input.main-element.form-control[readonly] {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    opacity: 1 !important;
    background-color: #fff !important;
}
.org-verify-panel {
    margin-bottom: 12px;
}

.org-verify-field {
    max-width: 760px;
}

.org-verify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.org-verify-title {
    font-weight: 600;
    color: #333;
}

.org-verify-title .fas {
    margin-right: 6px;
}

.org-verify-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.org-verify-controls input {
    width: 260px;
}

.org-verify-controls select {
    width: 76px;
}

.org-verify-result {
    margin-top: 10px;
    margin-bottom: 0;
}

.org-verify-field .org-verify-result {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
}

.org-verify-result-info {
    background: #eef5fb;
    border-color: #c8ddec !important;
    color: #2c5d7d;
}

.org-verify-result-success {
    background: #eef8f0;
    border-color: #c8e6ce !important;
    color: #2f6438;
}

.org-verify-result-warning {
    background: #fff8e8;
    border-color: #f1dfad !important;
    color: #7a5a12;
}

.org-verify-result-danger {
    background: #fdeeee;
    border-color: #edc6c6 !important;
    color: #8a3030;
}

.org-verify-item + .org-verify-item {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    padding-top: 10px;
}

.org-verify-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.org-verify-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.org-verify-save .fas {
    margin-right: 4px;
}

.org-verify-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 12px;
}

.org-verify-grid span {
    color: #666;
}

.quote-account-vat-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 2px 7px;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    vertical-align: middle;
}

.quote-account-vat-badge-success {
    background: #dff3e4;
    color: #23642f;
    border: 1px solid #b9dfc2;
}

.quote-account-vat-badge-warning {
    background: #fff1cf;
    color: #795414;
    border: 1px solid #ecd08f;
}

.quote-account-vat-badge-muted {
    background: #f2f3f5;
    color: #666;
    border: 1px solid #dfe2e6;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-edit-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    float: none !important;
    position: static;
    margin: 0 0 8px 0;
    padding: 5px 10px;
    background: var(--btn-primary-bg);
    border: 1px solid var(--btn-primary-border);
    border-radius: var(--border-radius-small);
    color: var(--btn-primary-color) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-edit-link:hover,
.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-edit-link:focus {
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-border);
    color: var(--btn-primary-color) !important;
    text-decoration: none !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-edit-link .fas {
    margin-right: 0;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-edit-link::after {
    content: "Upraviť položky";
}

.detail[data-scope="Quote"] .cell[data-name="items"].quote-items-editing > .inline-edit-link {
    display: none !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-save-link.quote-items-save-button,
.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-cancel-link.quote-items-cancel-button {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    float: none !important;
    position: static;
    margin: 0 6px 8px 0;
    padding: 5px 10px;
    border-radius: var(--border-radius-small);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-save-link.quote-items-save-button {
    background: var(--btn-primary-bg);
    border: 1px solid var(--btn-primary-border);
    color: var(--btn-primary-color) !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-save-link.quote-items-save-button:hover,
.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-save-link.quote-items-save-button:focus {
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-border);
    color: var(--btn-primary-color) !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-cancel-link.quote-items-cancel-button {
    background: var(--btn-default-bg);
    border: 1px solid var(--btn-default-border);
    color: var(--btn-default-color) !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-cancel-link.quote-items-cancel-button:hover,
.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-cancel-link.quote-items-cancel-button:focus {
    background: var(--btn-default-hover-bg);
    border-color: var(--btn-default-hover-border);
    color: var(--btn-default-color) !important;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-save-link.quote-items-save-button .fas,
.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-cancel-link.quote-items-cancel-button .fas {
    margin-right: 0;
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-save-link.quote-items-save-button::after {
    content: "Uložiť zmeny";
}

.detail[data-scope="Quote"] .cell[data-name="items"] > .inline-cancel-link.quote-items-cancel-button::after {
    content: "Zrušiť";
}

@media (max-width: 640px) {
    .org-verify-controls,
    .org-verify-controls input,
    .org-verify-controls select,
    .org-verify-controls button {
        width: 100%;
    }

    .org-verify-grid {
        grid-template-columns: 1fr;
    }
}
