﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.clickable-row {
    cursor: pointer;
}

table tr.clickable-row:hover td {
    background-color: #f5f5f5 !important;
}

.navbar .btn {
    white-space: nowrap;
    overflow: hidden;
}

.cart-button {
    width: 44px;
    height: 44px;
    padding: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-icon {
    font-size: 1.3rem;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    transform: none;
    font-size: 0.65rem;
    padding: 2px 5px;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 6px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    border-top: none;
}

/* Опционально: убрать border у фокуса */
.input-group .form-control:focus {
    box-shadow: none;
}

.autocomplete-suggestions li {
       padding: 8px 12px;
        cursor: pointer;
}

.autocomplete-suggestions li:last-child {
            border-bottom: none;
            border-bottom-left-radius: 0.5rem;
            border-bottom-right-radius: 0.5rem;
}

.autocomplete-suggestions li:hover {
            background-color: #f1f1f1;
}

.autocomplete-suggestions:empty {
    display: none;
}

.no-outline:focus {
    outline: none !important;
    box-shadow: none !important;
}
#toggleStockRows {
    padding: 2px 12px;
    font-size: 0.8rem;
}

#toggleStockRows:focus {
    box-shadow: none;
}

/* одинаковая ширина цифр */
.price {
    font-variant-numeric: tabular-nums;
}

/* Вложенная таблица наследует фон родительской строки */
.table-nested,
.table-nested > :not(caption) > * > * {
    background-color: transparent !important; /* убираем белый фон ячеек */
    box-shadow: none; /* убираем cell shadow у Bootstrap 5 */
}

/* Кнопка всегда центрируется по высоте поля */
.form-floating.has-toggle {
    position: relative;
}

    .form-floating.has-toggle .toggle-password {
        position: absolute;
        right: .5rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 3; /* поверх плавающего лейбла */
    }
    /* Чтобы текст не уходил под кнопку */
    .form-floating.has-toggle > .form-control {
        padding-right: 6rem; /* под ширину кнопки */
    }
