@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

/* Theme color overrides - Main brand color */
:root, [data-bs-theme=light], [data-menu-theme=light] {
    --tblr-primary: #337ab7;
    --tblr-primary-rgb: 51, 122, 183;
    --tblr-primary-text-emphasis: #14304a;
    --tblr-primary-bg-subtle: #d4e4f3;
    --tblr-primary-border-subtle: #a9c9e7;
    --tblr-link-color: #337ab7;
    --tblr-link-color-rgb: 51, 122, 183;
    --tblr-link-hover-color: #296292;
    --tblr-link-hover-color-rgb: 41, 98, 146;
    --tblr-focus-ring-color: rgba(51, 122, 183, .25);
    --bg-switch-checked-color: #337ab7;
}

[data-bs-theme=dark], [data-menu-theme=dark] {
    --tblr-primary: #5599cc;
    --tblr-primary-rgb: 85, 153, 204;
    --tblr-primary-text-emphasis: #88b8dd;
    --tblr-primary-bg-subtle: #0a1822;
    --tblr-primary-border-subtle: #1f4968;
    --tblr-link-color: #88b8dd;
    --tblr-link-hover-color: #9fc7e5;
    --tblr-link-color-rgb: 136, 184, 221;
    --tblr-link-hover-color-rgb: 159, 199, 229;
    --tblr-code-color: #88b8dd;
    --bg-switch-checked-color: #5599cc;
    /* --tblr-bg-surface: #101010; */
    /* --tblr-navbar-bg: #101010; */
}

/* Menu icons — Backpack hides them between lg and xl breakpoints */
.nav-icon.d-lg-none {
    display: inline-block !important;
}

/* Tab hover: brighten toward primary instead of darkening */
#form_tabs .nav-tabs .nav-link:not(.active):hover {
    color: var(--tblr-gray-200);
}


/* Modal table helpers */
.drag-handle { cursor: grab; }
#sortable-products tr, #sortable-images tr { cursor: grab; }
.img-thumb { max-width: 60px; max-height: 40px; object-fit: cover; }

/* Currency list: right-align the "Last modified" header (cells use a text-end wrapper) */
.currency-list table thead th[data-column-name="updated_at"] { text-align: right; }

/* Custom label styles for brand slugs */
.label {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.label a {
    color: inherit;
    opacity: 0.6;
}

.label a:hover {
    opacity: 1.0;
}

.label-default {
    background-color: #6c757d;
    color: #fff;
}

.label-wexas {
    background-color: #6296C8;
    color: #fff;
}

.label-bss {
    background-color: #94B5BB;
    color: #fff;
}

.label-tlcc {
    background-color: #6A2A34;
    color: #fff;
}

.label-tlhc {
    background-color: #CFAB8F;
    color: #fff;
}

.label-wtm {
    background-color: #222222;
    color: #fff;
}

/* Role badges — dark bg with colored border-left indicator */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    margin: 1px 2px;
    background: #475569;
    color: #f1f5f9;
    border-left: 3px solid #94a3b8;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
}

.role-badge--danger    { border-left-color: #f87171; }
.role-badge--primary   { border-left-color: #60a5fa; }
.role-badge--info      { border-left-color: #22d3ee; }
.role-badge--success   { border-left-color: #4ade80; }
.role-badge--warning   { border-left-color: #fbbf24; }
.role-badge--dark      { border-left-color: #e2e8f0; }
.role-badge--secondary { border-left-color: #94a3b8; }
.role-badge--faded    { opacity: 0.45; }
.role-badge--custom   { border-left: 3px dashed #fbbf24; cursor: pointer; }
.role-badge--superadmin { background: #d9534f; }

/* ── Compact icon-only line action buttons (global) ── */

/* Narrow ID column */
.table [data-column-name="id"] {
    width: 1%;
    white-space: nowrap;
}

/* Narrow tag/status/shortcut columns so Brand + Frontend get the width */
.table [data-column-name="slug_tag"],
.table [data-column-name="status"],
.table [data-column-name="shortcuts"],
.table [data-column-name="related"] {
    width: 1%;
    white-space: nowrap;
}

/* Right-align the Slug + Status columns (header + cells) */
.table [data-column-name="slug_tag"],
.table [data-column-name="status"] {
    text-align: right;
}

/* Button/badge styled as static text — no pointer cursor, no hover shift */
.btn-static {
    cursor: default;
    pointer-events: none;
}

/* Lists that show all rows (page length -1) don't need the length select or pager */
.dt-container:has(table[data-default-page-length="-1"]) .dt-length,
.dt-container:has(table[data-default-page-length="-1"]) .dt-paging {
    display: none;
}

/* Minimize + right-align the action column everywhere: default bp-button cells
   AND custom line/page/tag button groups. Backpack has no config for this. */
.table td:has([bp-button]),
.table td:has(.btn-group) {
    font-size: 0;
    white-space: nowrap;
    overflow: visible;
    width: 1%;
    text-align: right;
}

/* Action column header aligned to match its right-aligned cells */
.table th[data-action-column="true"] {
    text-align: right;
}

.table .btn-sm.btn-link[bp-button] {
    background: var(--tblr-secondary);
    color: #fff;
    border: none;
    padding: 0.25rem 0.45rem;
    text-decoration: none;
    border-radius: 0;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.2;
    display: inline-block;
}

.table .btn-sm.btn-link[bp-button] span {
    display: none;
}

.table .btn-sm.btn-link[bp-button]:hover {
    filter: brightness(0.85);
    color: #fff;
}

.table .btn-sm.btn-link[bp-button="delete"],
.table .btn-sm.btn-link[bp-button="trash"] {
    background: var(--tblr-danger);
}

.table .btn-sm.btn-link[bp-button]:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.table .btn-sm.btn-link[bp-button]:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}


/* Custom styles for action buttons column */
[data-column-name="custom_actions"] {
    width: 1%;
    white-space: nowrap;
}

/* Consistent button height across list views */
.table td .btn-group > .btn,
.table td .listing-toggle > .btn {
    height: 26px;
    padding-top: 0;
    padding-bottom: 0;
}

/* ── Horizontal field layout (opt-in via contentClass) ── */
.horizontal-fields [bp-field-wrapper] {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0 1rem;
    align-items: start;
}

.horizontal-fields [bp-field-wrapper] > label {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0.55rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.875rem;
}

.horizontal-fields [bp-field-wrapper] > :not(label) {
    grid-column: 2;
}

/* Full-width escape: fields that should ignore the 2-column grid */
.horizontal-fields [bp-field-type="custom_html"],
.horizontal-fields [bp-field-type="user_permission_checklist"] {
    grid-template-columns: 1fr;
}

/* Boolean fields: center-align label with checkbox */
.horizontal-fields [bp-field-type="boolean"] {
    align-items: center;
}

.horizontal-fields [bp-field-type="boolean"] > label {
    padding-top: 2px;
}

/* Compact, visible separator lines */
.horizontal-fields [bp-field-type="custom_html"] hr {
    margin: 0.25rem 0;
    opacity: 0.4;
}

/* Section separators: override grid to full-width single column */
[bp-field-type="custom_html"][bp-field-name*="separator"] {
    display: block !important;
}


/* Permission checklist fieldset borders */
[bp-field-type="user_permission_checklist"] fieldset {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px 20px;
}

[bp-field-type="user_permission_checklist"] fieldset + fieldset {
    margin-top: 20px;
}

[bp-field-type="user_permission_checklist"] fieldset legend {
    width: auto;
    padding: 0 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    float: none;
}

/* Reduce vertical spacing in form tabs */
.tab-pane [bp-field-wrapper].mb-3 {
    margin-bottom: 0.5rem !important;
}

/* ── Translatable locale flag as input background ── */
[bp-field-wrapper]:has(.translatable-locale) input.form-control,
[bp-field-wrapper]:has(.translatable-locale) textarea.form-control,
[bp-field-wrapper]:has(.translatable-locale) select.form-control {
    background-repeat: no-repeat;
    background-position: bottom 4px right 6px;
    background-size: 20px auto;
    padding-right: 32px;
}

/* UK flag */
[bp-field-wrapper]:has(.locale-en) input.form-control,
[bp-field-wrapper]:has(.locale-en) textarea.form-control,
[bp-field-wrapper]:has(.locale-en) select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 5 36 26'%3E%3Cpath fill='%2300247D' d='M0 9.059V13h5.628zM4.664 31H13v-5.837zM23 25.164V31h8.335zM0 23v3.941L5.63 23zM31.337 5H23v5.837zM36 26.942V23h-5.631zM36 13V9.059L30.371 13zM13 5H4.664L13 10.837z'/%3E%3Cpath fill='%23CF1B2B' d='M25.14 23l9.712 6.801c.471-.479.808-1.082.99-1.749L28.627 23H25.14zM13 23h-2.141l-9.711 6.8c.521.53 1.189.909 1.938 1.085L13 23.943V23zm10-10h2.141l9.711-6.8c-.521-.53-1.188-.909-1.937-1.085L23 12.057V13zm-12.141 0L1.148 6.2C.677 6.68.34 7.282.157 7.949L7.372 13h3.487z'/%3E%3Cpath fill='%23EEE' d='M36 21H21v10h2v-5.836L31.335 31H32c1.117 0 2.126-.461 2.852-1.199L25.14 23h3.487l7.215 5.052c.093-.337.158-.686.158-1.052v-.058L30.369 23H36v-2zM0 21v2h5.63L0 26.941V27c0 1.091.439 2.078 1.148 2.8l9.711-6.8H13v.943l-9.914 6.941c.294.07.598.116.914.116h.664L13 25.163V31h2V21H0zM36 9c0-1.091-.439-2.078-1.148-2.8L25.141 13H23v-.943l9.915-6.942C32.62 5.046 32.316 5 32 5h-.663L23 10.837V5h-2v10h15v-2h-5.629L36 9.059V9zM13 5v5.837L4.664 5H4c-1.118 0-2.126.461-2.852 1.2l9.711 6.8H7.372L.157 7.949C.065 8.286 0 8.634 0 9v.059L5.628 13H0v2h15V5h-2z'/%3E%3Cpath fill='%23CF1B2B' d='M21 15V5h-6v10H0v6h15v10h6V21h15v-6z'/%3E%3C/svg%3E");
}

/* US flag */
[bp-field-wrapper]:has(.locale-us) input.form-control,
[bp-field-wrapper]:has(.locale-us) textarea.form-control,
[bp-field-wrapper]:has(.locale-us) select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 5 36 26'%3E%3Cpath fill='%23B22334' d='M35.445 7C34.752 5.809 33.477 5 32 5H18v2h17.445zM0 25h36v2H0zm18-8h18v2H18zm0-4h18v2H18zM0 21h36v2H0zm4 10h28c1.477 0 2.752-.809 3.445-2H.555c.693 1.191 1.968 2 3.445 2zM18 9h18v2H18z'/%3E%3Cpath fill='%23EEE' d='M.068 27.679c.017.093.036.186.059.277.026.101.058.198.092.296.089.259.197.509.333.743L.555 29h34.89l.002-.004c.135-.233.243-.483.332-.741.034-.099.067-.198.093-.301.023-.09.042-.182.059-.275.041-.22.069-.446.069-.679H0c0 .233.028.458.068.679zM0 23h36v2H0zm0-4v2h36v-2H18zm18-4h18v2H18zm0-4h18v2H18zM0 9c0-.233.03-.457.068-.679C.028 8.542 0 8.767 0 9zm.555-2l-.003.005L.555 7zM.128 8.044c.025-.102.06-.199.092-.297-.034.098-.066.196-.092.297zM18 9h18c0-.233-.028-.459-.069-.68-.017-.092-.035-.184-.059-.274-.027-.103-.059-.203-.094-.302-.089-.258-.197-.507-.332-.74.001-.001 0-.003-.001-.004H18v2z'/%3E%3Cpath fill='%233C3B6E' d='M18 5H4C1.791 5 0 6.791 0 9v10h18V5z'/%3E%3Cpath fill='%23FFF' d='M2.001 7.726l.618.449-.236.725L3 8.452l.618.448-.236-.725L4 7.726h-.764L3 7l-.235.726zm2 2l.618.449-.236.725.617-.448.618.448-.236-.725L6 9.726h-.764L5 9l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L9 9l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L13 9l-.235.726zm-8 4l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L5 13l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L9 13l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L13 13l-.235.726zm-6-6l.618.449-.236.725L7 8.452l.618.448-.236-.725L8 7.726h-.764L7 7l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L11 7l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L15 7l-.235.726zm-12 4l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L3 11l-.235.726zM6.383 12.9L7 12.452l.618.448-.236-.725.618-.449h-.764L7 11l-.235.726h-.764l.618.449zm3.618-1.174l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L11 11l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L15 11l-.235.726zm-12 4l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L3 15l-.235.726zM6.383 16.9L7 16.452l.618.448-.236-.725.618-.449h-.764L7 15l-.235.726h-.764l.618.449zm3.618-1.174l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L11 15l-.235.726zm4 0l.618.449-.236.725.617-.448.618.448-.236-.725.618-.449h-.764L15 15l-.235.726z'/%3E%3C/svg%3E");
}
