/* Современные стили для модальных окон 2024 */
.modal {
    z-index: 1050 !important;
    pointer-events: auto !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

.modal-content {
    position: relative;
    z-index: 1060 !important;
    pointer-events: auto !important;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    background: #fff;
    border: none;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.modal-content:hover {
    transform: translateZ(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1e3a8a;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
    border-radius: 15px 15px 0 0 !important;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e3c72, #2a5298, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.modal-header .btn-close {
    position: relative !important;
    z-index: 1071 !important;
    pointer-events: auto !important;
    color: #1e3a8a;
    font-size: 1rem;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    padding: 10px;
    margin: 0;
    width: 24px;
    height: 24px;
}

.modal-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background: rgba(30, 58, 138, 0.2);
}

.modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    letter-spacing: 0.3px;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-title i {
    background: rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modal-body {
    padding: 30px;
    background-color: white;
}

.modal-footer {
    position: relative !important;
    z-index: 1070 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    background-color: #f8faff;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
}

.modal-footer .btn {
    position: relative !important;
    z-index: 1071 !important;
    pointer-events: auto !important;
}

/* Современные стили для поиска */
.search-wrapper {
    position: relative;
    z-index: 1070 !important;
    margin-bottom: 15px;
}

.input-group {
    border: 1px solid rgba(30, 58, 138, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-text {
    background: transparent;
    border: none;
}

.search-wrapper .input-group:focus-within {
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.1);
    transform: translateY(-2px);
}

.search-wrapper .input-group-text {
    background-color: #ffffff;
    border: none;
    color: #1e3c72;
    padding-left: 20px;
    font-size: 1.1rem;
}

.filter-search {
    position: relative;
    z-index: 1071 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: none;
    padding: 15px 18px;
    font-size: 1rem;
    background-color: #ffffff;
}

.filter-search:focus {
    border-color: #4285f4 !important;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.3) !important;
}

.filter-search::placeholder {
    color: #a8b3cf;
    font-weight: 300;
}

/* Современные стили для контейнера элементов */
.filter-items-container {
    max-height: 300px !important;
    overflow-y: auto !important;
    position: relative !important;
    z-index: 1065 !important;
    padding: 10px !important;
    background-color: #fff !important;
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: #2a5298 #f5f7ff;
    border: 1px solid rgba(30, 60, 114, 0.1);
    transition: all 0.3s ease;
}

.filter-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-items-container::-webkit-scrollbar-track {
    background: #f5f7ff;
    border-radius: 10px;
}

.filter-items-container::-webkit-scrollbar-thumb {
    background-color: #2a5298;
    border-radius: 10px;
    background-image: linear-gradient(180deg, #1e3c72, #2a5298);
}

/* Современные стили для элементов списка */
.filter-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-check {
    position: relative;
    z-index: 1066 !important;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    border-radius: 4px !important;
    transition: background-color 0.2s !important;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.form-check:hover {
    background-color: #f8f9fa !important;
    border-color: rgba(30, 60, 114, 0.1);
    transform: translateX(4px) translateZ(5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.form-check-input {
    position: relative !important;
    z-index: 1067 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border: 2px solid rgba(30, 60, 114, 0.3);
    cursor: pointer;
    border-radius: 6px;
}

.form-check-input:checked {
    background-color: #1e3c72;
    border-color: #1e3c72;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    position: relative !important;
    z-index: 1067 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    pointer-events: auto !important;
    font-weight: 400;
    color: #445277;
    margin-left: 8px;
}

/* Современные стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.4), rgba(191, 219, 254, 0.3));
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.loading-indicator .spinner-border {
    width: 45px;
    height: 45px;
    color: #1e3c72;
    border-width: 3px;
    animation-duration: 1.2s;
}

.loading-indicator p {
    font-size: 1rem;
    margin-top: 16px;
    color: #1e3a8a;
    font-weight: 500;
}

/* Современные стили для разделителя */
.filter-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1), rgba(30, 60, 114, 0.1));
    margin: 20px 0;
    border-radius: 1px;
}

/* Современные стили для "Выбрать все" */
.select-all-wrapper {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.1);
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.select-all-wrapper:hover {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    transform: translateX(4px);
}

.select-all-counter {
    color: #445277;
    font-size: 0.875rem;
    margin-left: 8px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.1), rgba(42, 82, 152, 0.1));
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Современные стили для контейнера выбранных ИНН */
.section-title {
    font-size: 1.1rem;
    color: #445277;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.section-title i {
    color: #3bc374;
    margin-right: 10px;
    background: rgba(59, 195, 116, 0.1);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-inns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 70px;
    padding: 16px;
    border: 1px dashed rgba(30, 60, 114, 0.3);
    border-radius: 14px;
    background-color: #f5f7ff;
    transition: all 0.3s ease;
}

.selected-inns-container:empty::after {
    content: 'Пока не выбрано ни одного ИНН';
    color: #a8b3cf;
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 10px;
}

.selected-inn-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin: 5px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.6), rgba(191, 219, 254, 0.5));
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-inn-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.remove-inn {
    margin-left: 8px;
    background: rgba(30, 58, 138, 0.1);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #1e3a8a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-inn:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* Современные стили для кнопок */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-secondary {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border: 1px solid rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #f5f9ff, #edf3ff);
    border-color: rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #1e3c72, #2a5298);
    opacity: 0.95;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* Стили для компактной секции расширенного поиска */
.advanced-search-compact-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    overflow: hidden;
    display: none; /* По умолчанию скрыто */
    position: relative;
    z-index: 10;
    border: 1px solid #e0e4ec;
}

.advanced-search-compact-section.active {
    display: block;
}

.advanced-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    padding: 8px 12px;
}

.advanced-search-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.advanced-search-header h5 i {
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.2);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-advanced-search {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-advanced-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.advanced-search-body {
    display: flex;
    padding: 0;
}

/* Стили для левой панели с фильтрами */
.advanced-filters-panel {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.advanced-filters-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.filter-group {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 58, 138, 0.05);
}

.filter-group-header {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-group-header:hover {
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.85), rgba(191, 219, 254, 0.8));
}

.filter-group-header i {
    margin-right: 10px;
    color: #1e3a8a;
}

.filter-group-body {
    padding: 15px 20px;
    background-color: white;
}

/* Стили для фильтров-чипсов */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.5), rgba(191, 219, 254, 0.4));
    color: #1e3a8a;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.7), rgba(191, 219, 254, 0.6));
}

.filter-chip i {
    margin-right: 8px;
    font-size: 0.85rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #1e3a8a;
    color: white;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Стили для правой панели с предпросмотром */
.preview-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.preview-panel:hover {
    transform: translateZ(5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.preview-header {
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(219, 234, 254, 0.75), rgba(191, 219, 254, 0.7));
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-header h6 {
    margin: 0;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.preview-header h6 i {
    margin-right: 10px;
}

.preview-body {
    padding: 20px;
    background: white;
}

.preview-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.preview-section:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.preview-value {
    color: #445277;
    font-size: 0.95rem;
}

.preview-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8faff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Стили для floating inputs */
.form-floating > .form-control {
    height: calc(2.5rem + 2px);
    padding: 0.5rem 0.75rem;
    line-height: 1.25;
}

.form-floating > label {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.form-check.form-switch.custom-switch {
    padding-left: 2.5em;
    margin-top: 0.9rem;
}

.form-check.form-switch.custom-switch .form-check-input {
    width: 2.5em;
    margin-left: -2.5em;
    height: 1.25em;
}

.form-check.form-switch.custom-switch .form-check-label {
    padding-top: 0.15em;
    font-size: 0.85rem;
}

.dates-row {
    margin-top: 0.5rem;
}

/* Стили для тегов фильтров в предпросмотре */
.filter-tag {
    display: inline-flex;
    align-items: center;
    background: #f0f3fa;
    border: 1px solid #dce1ed;
    border-radius: 4px;
    padding: 3px 8px;
    margin: 2px;
    font-size: 0.75rem;
    color: #445277;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: #e5eaf6;
    transform: translateY(-1px);
}

.filter-tag i {
    margin-right: 4px;
    color: #1e3c72;
    font-size: 0.7rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .advanced-search-body {
        flex-direction: column;
    }
    
    .advanced-filters-panel {
        border-right: none;
        border-bottom: 1px solid #e0e4ec;
    }
    
    .filter-chips {
        justify-content: flex-start;
    }
    
    .filter-tag {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .filter-items-container {
        max-height: 320px;
    }
    
    .form-check {
        padding: 10px 15px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .text-muted.text-center {
        padding: 16px;
    }
}

/* Стили из my_searches.html */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #e9eef5 !important;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e9eef5 !important;
}

.content-wrapper {
    flex: 1 0 auto;
    background-color: #e9eef5 !important;
    min-height: 100vh;
}

.container {
    background-color: transparent !important;
}

.search-container {
    background-color: transparent !important;
}

.nav-tabs-container {
    background-color: #2d3748 !important;
}

.tab-content {
    background-color: transparent !important;
}

/* Стили для блока результатов поиска */
.search-results {
    background-color: transparent !important;
}

.results-container {
    background-color: transparent !important;
    display: grid;
    gap: 0;
}

.tender-card {
    background-color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 8px !important;
}

.tender-main {
    background-color: #fff !important;
}

.tender-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid #eee;
}

.empty-state {
    background-color: transparent !important;
    color: #000 !important;
}

.empty-state i {
    color: #000 !important;
}

.empty-state p {
    color: #000 !important;
}

/* Переопределяем стили Bootstrap если они перекрывают наши */
.bg-white {
    background-color: transparent !important;
}

.bg-light {
    background-color: transparent !important;
}

/* Стили для свернутой секции расширенного поиска */
.advanced-search-section.collapsed {
    padding: 0;
} 