@font-face {
    font-display: optional; /* без «стрибка» шрифту: не встиг — лишається запасний до кінця сторінки */
    font-family: 'NimbusSanLBoldCond';
    src: url('../fonts/nimbussanl_boldcond.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.profile-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 70px;
}
.profile-image {
    width: 150px; /* Ширина круга */
    height: 150px; /* Высота круга */
    background-size: cover; /* Изображение полностью покрывает элемент */
    background-position: center; /* Центрирование изображения */
    border-radius: 50%; /* Делает элемент круглым */
    border: 1px solid #2d5437; /* Внешняя граница (цвет #2d5437) */
    box-shadow: 0 0 0 1px #fff, 0 0 0 5px #2d5437; /* Внутренняя граница: 1px белая, 1px цвета #2d5437 */
    margin: 20px auto; /* Центрирует элемент по горизонтали и добавляет отступы */
    display: block; /* Делает элемент блочным для центрирования */
}
.change-image-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #2d5437;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}
.change-image-btn:hover {
    background-color: #45a049;
}
.hidden-input {
    display: none;
}
.container1 {
    display: flex;
    justify-content: center;
    align-items: center;
}
a {
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}

.gear-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    cursor: pointer;
}
.back_to_profile {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #2d5437;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-decoration: none;
    position: relative;
    top: -20px;
    left:-320px;
}
.back_to_profile i {
    color: white;
    margin-right: 8px;
}
.back_to_profile:hover {
    background-color: #45a049;
}
.center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 100px;
}
.profile-field {
    margin: 20px 0;
    text-align: center;
}
.edit-button {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: #2d5437;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-decoration: none;
}
.edit-button:hover {
    background-color: #45a049;
}
.error-message {
    color: red;
    font-size: 12px;
}
.input-field {
    color: #2d5437;
    width: 500px;
    height: 100px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
input[type="text"] {
    padding: 10px;
    font-size: 24px;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    margin-bottom: 10px;
    text-align: center;
}
input[type="text"]:focus {
    outline: none;
    border-color: #45a049;
}
.flex-container {
    display: flex;
    justify-content: space-between;
    width: 60%;
}
.profile-field p {
    text-align: center;
    width: 100%;
}
.gender-container {
display: flex;
flex-direction: column; /* Display items in a column */
align-items: center; /* Center items horizontally */
gap: 10px; /* Adjust the gap between elements as needed */
margin-bottom: 10px;

}

.gender-buttons {
display: flex;
gap: 10px; /* Adjust the gap between gender buttons as needed */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.gender-button {
width: 70px;
height: 70px;
background-color: white;
border: 2px solid #2d5437;
padding: 10px;
border-radius: 5px;
cursor: pointer;
font-size: 24px;
display: flex;
align-items: center;
justify-content: center;
color: #27592d; /* Set the color here */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.gender-button.active {
background-color: #2d5437;
color: white;
}

.confirm-gender-wrapper {
margin-top: 10px; /* Adjust spacing between gender buttons and confirm button */
}

.confirm-gender-btn {
padding: 10px 20px;
background-color: #2d5437;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
text-decoration: none;
}

.confirm-gender-btn:hover {
background-color: #45a049;
}

#success-message {
    position: fixed;
    bottom: 20px; /* Расположить ниже */
    left: 20px;
    padding: 10px;
    background-color: green;
    color: white;
    border-radius: 5px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    overflow: hidden; /* Для скрытия анимации за границами контейнера */
  }
  
  #success-message.show {
    opacity: 1;
  }
  
  /* Анимация линии */
  @keyframes slide {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
  }
  
  #success-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    animation: slide 3s linear;
  }
  
  .hidden {
    display: none;
  }
  /* Контейнер для двух инпутов */
.name-container {
    display: flex;
    justify-content: center;
    margin: 20px;
}

/* Группировка инпутов и перегородки */
.input-group {
    display: flex;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f0f0f0; /* Легкий фоновый цвет для контейнера */
  
}

/* Инпуты */
.input-group input[type="text"] {
    flex: 1;
    padding: 10px;
    font-size: 24px;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    text-align: center;
    margin: 0; /* Убираем отступы для выравнивания */
    
}
input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    font-size: 24px;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
    overflow: hidden; /* Prevent scrollbars */
    resize: none; /* Disable resizing */
    margin:20px;
}
/* Перегородка */
.divider {
    width: 2px; /* Ширина перегородки */
    height: 100%; /* Высота перегородки соответствует высоте инпутов */
    background-color: #2d5437; /* Цвет перегородки */
}

/* Кнопка отправки формы */
.name-container button {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 18px;
    color: #fff;
    background-color: #2d5437;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.name-container button:hover {
    background-color: #45a049;
}
.form-row {
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between the inputs */
    margin-bottom: 20px; /* Space below the row */
}
.form-row input[type="text"] {
    flex: 1;
    max-width: 200px; /* Adjust as needed */
}
.date-container {
    display: flex;
    justify-content: center;
    margin-top: 20px; /* Space above the date section */
    width:800px;
    
}
.date-container input[type="date"] {
    padding: 10px;
    font-size: 24px;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    text-align: center;
    width: 100%; /* Full width of container */
    max-width: 500px; /* Adjust as needed */
}

.char-count {
    font-size: 14px;
    color: #2d5437;
}

.char-count span {
    color: green;
}
input[type="text"], textarea, input[type="date"] {
    width: calc(100% - 120px); /* Увеличиваем пространство для кнопки */
    padding: 10px;
    font-size: 16px;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    margin-right: 10px; /* Отступ справа для кнопки */
}

input[type="text"]:focus, textarea:focus, input[type="date"]:focus {
    outline: none;
    border-color: #45a049;
}
input[type="date"] {
    width: calc(100% - 120px); /* Увеличиваем пространство для кнопки */
    padding: 10px;
    font-size: 16px;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    margin-right: 10px; /* Отступ справа для кнопки */
}

input[type="date"]:focus {
    outline: none;
    border-color: #45a049;
}





/* Container for buttons */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the buttons horizontally */
    gap: 10px; /* Spacing between buttons */
    margin-bottom: 20px; /* Add space below the button container */
}

/* General button styles */
.car-brand-button {
    background-color: white;
    color: #2d5437;
    border: 2px solid #2d5437;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
   
    width: 140px; /* Fixed width for buttons */
    text-align: center; /* Center text inside button */
}

.car-brand-button.active {
    background-color:#2d5437;
    color: white;
}



/* Save button style */
.save-button {
    background-color:#2d5437;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.save-button:hover {
    background-color: #45a049;
}

#search-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Стили для полосы прокрутки */
#search-results::-webkit-scrollbar {
    width: 8px; /* Ширина полосы прокрутки */
    border-radius: 5px; /* Радиус полосы прокрутки */
}

#search-results::-webkit-scrollbar-track {
    background: #f1f1f1; /* Цвет трека */
    border-radius: 5px; /* Радиус трека */
}

#search-results::-webkit-scrollbar-thumb {
    background-color: #2d5437; /* Цвет ползунка */
    border-radius: 3px; /* Радиус ползунка */
}

#search-results::-webkit-scrollbar-thumb:hover {
    background-color: #45a049; /* Цвет ползунка при наведении */
}

/* Firefox стили для прокрутки */
#search-results {
    scrollbar-width: thin;
    scrollbar-color: #2d5437 #f1f1f1;
}


.result-item {
    width: 550px; /* Устанавливает ширину на 600 пикселей */
    padding: 10px; /* Добавляет отступы внутри поля ввода для удобства */
    border: 1px solid #2d5437; /* Добавляет границу вокруг поля ввода */
   
    font-size: 16px; /* Устанавливает размер шрифта для текста внутри поля ввода */
    box-sizing: border-box; /* Учитывает отступы и границы в общей ширине */
    color:#2d5437;
}

.result-item:hover {
    background-color: #f0f0f0;
}

.save-button {
    background-color: #2d5437;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.save-button:hover {
    background-color: #45a049;
}

.message-box {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 10px;
    background-color: green;
    color: white;
    border-radius: 5px;
    z-index: 1000;
    font-size: 16px;
    margin-top: 60px;
}

@keyframes slide-in {
    0% { transform: translateX(100%); }
    100% { transform: translateX(0); }
}

.message-box.show {
    display: block;
    animation: slide-in 0.5s forwards;
}

@keyframes progress {
    from { width: 0; }
    to { width: 100%; }
}

.progress-bar {
    height: 5px;
    background-color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    animation: progress 3s linear;
}

.selected-brand {
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
}
#search-input {
    width: 500px; /* Устанавливает ширину на 600 пикселей */
    padding: 10px; /* Добавляет отступы внутри поля ввода для удобства */
    border: 3px solid #2d5437; /* Добавляет границу вокруг поля ввода */
    border-radius: 5px; /* Скругляет углы поля ввода */
    font-size: 16px; /* Устанавливает размер шрифта для текста внутри поля ввода */
    box-sizing: border-box; /* Учитывает отступы и границы в общей ширине */
    color:#2d5437;
}
.prof_box {
    border:5px solid #85929e;
  
    padding: 20px;
    width: 55%;
    margin: 20px auto;
    text-align: center;
    background-color: white;
    margin-top:100px;
}





.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.save-button {
    background-color: #2d5437;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.save-button:hover {
    background-color: #45a049;
}

#success-message {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background-color: #d4edda;
    color: #155724;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
}
.color-option.active {
    border: 4px solid #2d5437;
}


.slider-container {
    position: relative;
    width: 800px;
    height: 400px;
    margin: 20px auto;
    overflow: hidden;
    border: 2px solid #2d5437;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.slider img {
    width: 600px;
    height: 400px;
    
    cursor: pointer;
}
.slider img:hover {
    background-color: #2d54378a;
}
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #2d5437;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1;
    text-align: center;
   
}

.left-arrow {
    left: 10px;
}

.right-arrow {
    right: 10px;
}
.arrow.hidden {
    display: none;
}
#reset-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #700101;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s ease;
}

#reset-button:hover {
    background-color: #a10505;
}
.centered-toggle-panel {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 20px; /* Adjust as needed */
    left:-20px;
}

.toggle-button {
    background-color: #2d5437;
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 15px 15px 0px 0px;
  width:820px;
}

.vertical-panel {
    position: relative;
    width: auto;
 
    height: 0; /* Initially hidden */
    overflow: hidden;
    background-color: e9e9e9;
    transition: height 0.3s ease;
  border-radius:0px 0px 5px 5px;
  
    
}

.vertical-panel.open {
    height: auto;
    width: auto;
 
}


.panel-content {
 
    display: none; /* Hidden by default */
}

.vertical-panel.open .panel-content {
    display: block; /* Show content when panel is open */
}

/* ============================================================
   Адаптив (планшет / телефон) — фіксовані ширини стають плинними,
   зміщення за межі екрана нейтралізуються
   ============================================================ */
@media (max-width: 900px) {
    .back_to_profile {
        left: 0;
        top: 0;
        margin: 16px auto;
    }
    .center-container { margin-top: 60px; }
    .flex-container { width: 92%; }
    .input-field {
        width: 100%;
        max-width: 500px;
        height: auto;
        min-height: 100px;
    }
    .date-container {
        width: auto;
        max-width: 800px;
        margin-left: 16px;
        margin-right: 16px;
    }
    .result-item,
    #search-input {
        width: 100%;
        max-width: 550px;
        box-sizing: border-box;
    }
    .prof_box { width: auto; max-width: 800px; margin: 60px 16px 20px; }
    .slider-container {
        width: auto;
        max-width: 800px;
        height: auto;
        aspect-ratio: 2 / 1;
        margin: 20px 16px;
    }
    .slider img { width: 100%; height: auto; }
    .toggle-button { width: 100%; max-width: 820px; box-sizing: border-box; }
    .centered-toggle-panel { left: 0; }
}

@media (max-width: 520px) {
    .profile-image { width: 120px; height: 120px; }
    .name-container { flex-direction: column; margin: 16px 12px; }
    .divider { width: 100%; height: 2px; }
    .form-row { flex-wrap: wrap; }
    input[type="text"],
    .input-group input[type="text"],
    textarea { font-size: 18px; }
    .gender-button { width: 60px; height: 60px; font-size: 20px; }
    .car-brand-button { width: calc(50% - 10px); }
    input[type="text"],
    textarea,
    input[type="date"] { width: 100%; margin-right: 0; }
}

