@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation-name: slide-out-to-left;
    animation-duration: 1s;
}

::view-transition-new(root) {
    animation-name: slide-in-from-right;
    animation-duration: 1s;
}

@keyframes slide-in-from-right {
    from {
        /* translate: 100vw 0; */
        opacity: 0;
    }
    to {
        /* translate: 100vw 0; */
        opacity: 1;
    }
}

@keyframes slide-out-to-left {
    from {
        /* translate: 100vw 0; */
        opacity: 1;
    }
    to {
        /* translate: -100vw 0; */
        opacity: 0;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    caret-color: rgba(0, 0, 0, 0);
    font-family: 'Inter', sans-serif;
}

button {
    box-shadow: 2px 2px 4px 1px #02020228;
}

body {
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    background-color: #ededed;
    color: #333;
    display: flex;
    min-height: 100vh;
    font-size: 14px;
}

.countryFlag {
    height: 20px;
    width: 24px;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 2px;
    border: 2px solid #ebebeb;
}

.address-cell {
    width: 180px;
    min-height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    border-right-width: 1px;
    border-left-width: 1px;
    padding: 8px;
}

.address-cell.line::after {
    content: " ";
    width: 100%;
    background-image: url(/images/dash.png);
    background-repeat: repeat-x;
    background-position: center;
}

.chooseContractorBtn {
    margin: 5px;
    margin: 5px;
    padding: 5px;
    color: #DF3D4A;
    border: none;
    border-radius: 10px;
    background-color: #00000000;
}

.chooseContractorBtn:hover {
    background-color: #0000001c;
}

.chooseContractorBtn:active {
    background-color: #0000004c;
}

.toContractBtn {
    margin: 5px;
    padding: 5px;
    color: #acabab;
    border: none;
    border-radius: 1px;
    background-color: #00000000;
}

.toContractBtn:hover {
    color: #7c7c7c;
}

.toContractBtn:active {
    color: #424242;
}


.splitRouteBtn {
    padding: 5px;
    color: #d41616;
    border: 1px solid #8d0f0f;
    border-radius: 5px;
    background-color: #c06a6a;
}

.splitRouteBtn:hover {
    background-color: #884646;
}

.splitRouteBtn:active {
    background-color: #632424;
}

.main-route-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.main-status-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 0.8em;
    flex-wrap: wrap;
}

.contract-menu-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.tab-button {
    background-color: white;
    border: none;
    border-bottom: 2px solid #bbbbbb;
    margin: 8px;
    padding: 6px;
    box-shadow: 2px 2px 10px 1px rgba(192, 192, 192, 0.185);
}

.tab-button:active {
    border-bottom: 2px solid red;
    background-color: #bbbbbb;
    
}

.tab-button:hover {
    background-color: #d4d3d3;
}

.tab-button.active {
    border-bottom: 2px solid red;
}

.group-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-menu-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.group-menu-container button {
    background-color: white;
    border: none;
    border-bottom: 2px solid #bbbbbb;
    margin: 8px;
    padding: 6px;
}

.group-menu-container button:active {
    border-bottom: 2px solid red;
    background-color: #bbbbbb;
}

.group-menu-container button:hover {
    background-color: #d4d3d3;
}

.group-menu-container button.active {
    border-bottom: 2px solid red;
}

.main-contacts-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.8em;
    margin: 6px;
    border-radius: 10px;
}

span.gray {
    background-color: #2E343C0F;
    border-radius: 12px;
    padding: 4px 8px;
    font-weight: 500;
}



/* Основной контент */
.main-content {
    /* position: absolute;
    margin-left: 46px; */
    padding-left: 46px;
    /*SIDE BAR*/
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.collapsible-content {
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.noncollapsible-content {
    max-height: 300px;
    max-width: 800px;
}

label:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Шапка */
.header {
    background-color: white;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 8px 15px;
    width: 300px;
}

.search-bar input {
    min-width: initial;
    height: initial;
    padding: initial;
    border-radius: initial;
    border: none;
    background: none;
    outline: none;
    margin-left: 10px;
    width: 100%;
    font-size: 14px;
}

.search-bar input[type="text"] {
    caret-color: black;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    max-height: 32px;
    width: fit-content;
}

.btn:disabled {
    background-color: #8f8e8e;
}
.btn:hover:disabled {
    background-color: #8f8e8e;
}

.btn-remove {
    background-color: #DF3D4A;
    color: white;
    border-color: #cf3946;
    border-radius: 20px;
    white-space: nowrap;
    background-image: url("/images/delete.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 32px 32px;
    height: 32px;
    width: 32px;
}

.btn-remove:hover {
    background-color: #cf3946;
    color: white;
    border-color: #cf3946;
}


/* Кнопки меню */
.btn-action {
    background-color: #DF3D4A;
    color: white;
    border-color: #cf3946;
    border-radius: 20px;
    white-space: nowrap;
}


.btn-action:hover {
    background-color: #cf3946;
    color: white;
    border-color: #cf3946;
}


.btn-primary {
    background-color: #2196f3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976d2;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Основной контент с фильтрами и таблицей */
.content-area {
    flex: 1;
    display: flex;
    padding: 4px;
    gap: 10px;
    overflow: hidden;
    background-color: #ededed;
}


/* Таблица */
.table-container {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: auto;
    display: flex;
    flex-direction: column;
    /* position: fixed; */
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    /* table-layout: fixed; */
}

table.fixed-layout{
    table-layout: fixed;
}

thead {
    /* height: 40px; */
    /* min-width: 60px; */
    background-color: #f8f9fa;
}

/* thead td{
    overflow: hidden;
    resize: horizontal;
} */

th {
    padding: 14px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
}

td {
    padding: 4px;
    padding-left: 10px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    font-size: 14px;
    overflow: hidden;
}

tbody td {
    vertical-align: top;
}

tbody tr:hover {
    background-color: #faf8f8;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.status-pending {
    background-color: #fff3e0;
    color: #ef6c00;
}

.deleted {
    text-decoration: line-through;
    color: #666;
}

.nowrap {
    width: 60px;
    white-space: nowrap;
    /* overflow: hidden; */
}

.sizeble {
    overflow: hidden;
    resize: horizontal;
    white-space: nowrap;
    min-width: 60px;
}

input {
    min-width: 100px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: none;
    outline: none;
    caret-color: black;
    border: 1px solid #2E343C1F;
    background-color: #2E343C0A;
}


select {
    min-width: 100px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: none;
    outline: none;
    caret-color: black;
    border: 1px solid #2E343C1F;
    background-color: #2E343C0A;
}

input.wrong {
    border: 1px solid #42272785;
    background-color: #52101030;
}

input.done {
    animation:input-done 0.5s ease-in;
}


select.wrong {
    border: 1px solid #42272785;
    background-color: #52101030;
}

select.done {
    animation:input-done 0.5s ease-in;
}

@keyframes input-done {
    from {
        border: 1px solid #27422985;
        background-color: #10521330;
    }
    to {
        border: 1px solid #2E343C1F;
        background-color: #2E343C0A;
    }
}

div.row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

div.row:hover {
    /* background-color: #2E343C0A; */
    background-color: #faf8f8;
}

div.column {
    display: flex;
    /* align-items: center; */
    flex-direction: column;
    flex-wrap: wrap;
    gap: 4px;
}


input::file-selector-button {
    background-color: dodgerblue;
    color: white;
    padding: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
