﻿/* Стили заголовка секции (Tab-style) */
.headerTitle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 10px 10px 0 0;
    font-weight: 700;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Контейнер секции */
.cardHead {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-bottom: 5px;
}

/* Настройка плавающих меток (form-floating) */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-floating > label {
    padding: 1rem 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Состояние Focus */
.form-floating > .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Инпуты в режиме disabled */
.form-control:disabled {
    background-color: #f1f3f5 !important;
    border-color: #e9ecef;
    color: #495057;
    opacity: 1;
    font-weight: 600;
}

/* DropDownListFilter (адаптация под стиль) */
::deep .dropdown-filter-input {
    border-radius: 8px !important;
    height: 58px !important; /* Соответствие высоте floating label */
}










/* Язычок для секции Деталей */
.detailTitle {
    background: #edf2f7; /* Чуть другой оттенок, чтобы отличить от Заказа */
    border: 1px solid #cbd5e0;
    border-bottom: none;
    display: inline-block;
    padding: 6px 18px;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.85rem;
}

/* Основной контейнер деталей */
.cardDetails {
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* Строка параметров (Вес, Срочность, Стоимость) */
.params-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кастомный стиль для чекбокс-айтемов */
.checkbox-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

    .checkbox-item.checked-row {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.05);
    }

/* Цвет иконок (ваш violet) */
.text-violet {
    color: #6366f1 !important;
}






.departure-params-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    --padding: 10px 15px;
    flex-wrap: wrap;
}

.params-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Общий контейнер для инпута с иконкой */
.param-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    height: 40px;
    transition: 0.2s;
}

    .param-input-wrapper:focus-within {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

    .param-input-wrapper input {
        border: none !important;
        background: transparent !important;
        padding-right: 35px !important;
        height: 100%;
        font-weight: 600;
    }

.input-icon-label {
    position: absolute;
    right: 10px;
    color: #94a3b8;
}

/* Специфические ширины */
.select-type {
    width: 140px;
}

.input-weight {
    width: 100px;
}

.importance-box {
    width: 80px;
}

.cost-box {
    width: 110px;
    background: #fef2f2;
    border-color: #fee2e2;
}

    .cost-box input {
        color: #dc2626 !important;
    }

/* Кнопка Добавить */
.btn-add-main {
    background: #10b981 !important;
    color: white;
    border: none;
    height: 40px;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.2s;
}

    .btn-add-main:hover {
        background: #059669 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
        color: #212529 !important;
    }

    .btn-add-main:active,
    .btn-add-main.active {
        background-color: #059669 !important; /* Более темный зеленый */
        transform: translateY(2px) !important; /* Ощутимый сдвиг вниз */
        box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.2) !important; /* Внутренняя тень вместо внешней */
        color: #212529 !important;
    }

        /* Убираем синюю обводку Bootstrap, которая все портит */
        .btn-add-main:focus,
        .btn-add-main:active:focus {
            box-shadow: none !important;
            outline: none !important;
            color: #212529 !important;
        }

/* Поповер доп услуг */
.services-dropdown-wrapper {
    position: relative;
}

/* Контейнер списка */
.services-popover {
    position: absolute;
    bottom: -10px;
    right: -400px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 240px;
    padding: 8px;
    z-index: 1050;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: fadeInScale 0.2s ease-out;
}

/* Заголовок внутри поповера */
.popover-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

/* Сама строка услуги */
.popover-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .popover-item:hover {
        background-color: #f8fafc;
    }

    /* Скрываем стандартный чекбокс, если хотим кастомный, 
   или просто стилизуем его для отступа */
    .popover-item input[type="checkbox"] {
        height: 18px;
        cursor: pointer;
        margin-right: 12px;
        accent-color: #3b82f6; /* Цвет галочки */
    }

    .popover-item label {
        display: flex;
        align-items: center;
        width: 100%;
        cursor: pointer;
        font-size: 0.9rem;
        color: #334155;
        margin-bottom: 0; /* Убираем Bootstrap margin */
    }

    /* Иконки внутри списка */
    .popover-item i {
        width: 20px;
        margin-right: 10px;
        color: #64748b;
        font-size: 1rem;
        transition: color 0.2s;
    }

    /* Подсветка иконки при чеке */
    .popover-item input:checked + label i {
        color: #3b82f6;
    }

    .popover-item input:checked + label {
        font-weight: 600;
        color: #1e293b;
    }

/* Анимация появления */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}









/* Шапка таблицы */
.thead-primary {
    background-color: #e3eaf1 !important;
    color: #475569 !important;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #cbd5e0 !important;
    text-transform: uppercase;
    padding: 12px 8px !important;
    z-index: 3;
}

    .thead-primary th {
        background-color: #e3eaf1 !important;
        color: #475569 !important;
        font-size: 0.7rem;
        letter-spacing: 0.05em;
        border-bottom: 2px solid #cbd5e0 !important;
        text-transform: uppercase;
        padding: 12px 8px !important;
    }


.table-solid-modal {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: auto;
    background-color: #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 210px;
    max-height: 330px;
    position: relative;
    border-collapse: separate;
    border-spacing: 0 12px;
    background-color: transparent;
}

    .table-solid-modal table {
        margin-bottom: 0;
        border-collapse: separate;
        border-spacing: 0 10px;
    }


    /* Строки и ячейки */
    .table-solid-modal tbody tr {
        transition: background-color 0.2s;
        border-bottom: 1px solid #f1f5f9;
        box-shadow: 0 8px 8px -3px rgba(0, 0, 0, 0.4), /* Основная тень */
        inset 0 1px 0 rgba(255, 255, 255, 0.8); /* Блик на верхнем ребре */
    }
        /* Эффект при наведении — делаем строку активной */
        .table-solid-modal tbody tr:hover {
            background-color: #f1f5f9 !important;
            box-shadow: inset 4px 0 0 #3b82f6; /* Синяя полоска слева при наведении */
        }

    /* Усиливаем контраст для заблокированных (readonly) полей */
    .table-solid-modal td:disabled,
    .table-solid-modal .text-truncate {
        color: #0f172a !important;
    }

    /* Инпуты внутри таблицы */
    .table-solid-modal,
    .table-solid-modal select {
        border: 1px solid transparent;
        background-color: rgba(241, 245, 249, 0.5);
        color: #1e293b;
    }

        .table-solid-modal .form-control:focus {
            border-color: #3b82f6;
            background-color: #fff;
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
        }








.bg-blue {
    background-color: #f8faff !important;
}
/* Для новых (load) отправлений */

/* Кастомные стили для инпутов внутри таблицы */
.form-control-xs {
    height: 28px;
    padding: 2px 5px;
    font-size: 0.8rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background-color: #fff;
}

/* Стилизация иконок статусов */
.table-solid-modal i {
    width: 20px;
    text-align: center;
}








.urgency-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    height: 38px;
    transition: all 0.2s ease;
    background: #fff;
    user-select: none;
    position: relative;
}

    /* Скрываем дефолтный чекбокс */
    .urgency-toggle input[type="checkbox"] {
        display: none;
    }

    /* Состояние при наведении */
    .urgency-toggle:hover:not(.disabled) {
        border-color: #fbbf24; /* Цвет молнии (желтый) */
        background: #fffdfa;
    }

    /* АКТИВНОЕ СОСТОЯНИЕ (выбрано "Срочно") */
    .urgency-toggle.active {
        background: #fffbeb !important;
        border-color: #fbbf24 !important;
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
    }

        .urgency-toggle.active i {
            color: #f59e0b !important; /* Яркая молния */
            filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.5));
            transform: scale(1.1);
        }

        .urgency-toggle.active span {
            color: #1e293b !important;
            font-weight: 700;
        }

    /* ЗАБЛОКИРОВАННОЕ СОСТОЯНИЕ (нет тарифа) */
    .urgency-toggle[disabled],
    .urgency-toggle.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: #f1f5f9;
        filter: grayscale(1);
    }

    /* Анимация иконки */
    .urgency-toggle i {
        transition: all 0.2s ease;
        margin-right: 8px;
        color: #94a3b8; /* Серый в выключенном состоянии */
    }











.validation-container {
    overflow: hidden;
}

.modern-alert {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffd6da; /* красный фон */
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-left: 4px solid #dc3545; /* Яркий акцент слева */
    border-radius: 6px;
    color: #ff0018;
    font-size: 0.9rem;
}

.alert-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    color: #dc3545; /* Иконка ярче текста */
}

.alert-content {
    font-weight: 500;
    line-height: 1.4;
}

/* Плавная анимация появления */
.fade-in-slide {
    animation: fadeInSlide 0.3s ease-out forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
