@import url('./base/tokens.css');
@import url('./base/theme.css');
@import url('./base/sidebar.css');
@import url('./base/topbar.css');
@import url('./base/subnav.css');
@import url('./base/modals.css');

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-linput, var(--bg-input, var(--bg-elevated))) inset !important;
    box-shadow: 0 0 0 1000px var(--bg-linput, var(--bg-input, var(--bg-elevated))) inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

.global-page-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity .25s ease;
    background: var(--bg-app);
}

.global-page-loader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/*-------------------------------------------------- loading btn*/
.save-spinner{
    width:18px;
    height:18px;
    border:2px solid rgba(255,255,255,.35);
    border-top-color:#fff;
    border-radius:50%;
    animation:spin .7s linear infinite;
}

@keyframes spin{
    to{
        transform:rotate(360deg);
    }
}

.saveBtn.loading{
    pointer-events:none;
    opacity:.8;
}

.saveBtn.loading .save-icon,
.saveBtn.loading .save-text{
    display:none;
}

.saveBtn.loading .save-spinner{
    display:block !important;
}

.icon-btn--busy {
    pointer-events: none;
    opacity: .5;
}

/*-------------------------------------------------- navbar search (inventory typeahead)*/
.navbar-search-typeahead {
    position: fixed;
    z-index: 10000;
    min-width: 280px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-elevated, #181d27);
    border: 1px solid var(--border-color, #2a2f3a);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.navbar-search-typeahead__item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #2a2f3a);
}

.navbar-search-typeahead__item:last-child {
    border-bottom: none;
}

.navbar-search-typeahead__item:hover {
    background: var(--surface-3, #0f1218);
}

.navbar-search-typeahead__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-search-typeahead__sub {
    font-size: 11px;
    color: var(--text-secondary, #9ca3af);
    margin-top: 2px;
}

/* Stripe subscription past due (context_processors.billing_alert) */
.billing-alert {
    margin: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.billing-alert a {
    color: var(--accent);
    text-decoration: underline;
}
