/* Общий контейнер */
.trailer-rental-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /*background: #eaf5e7;*/ /* светло-зелёный фон */
    border-radius: 20px;
    padding: 25px;
    max-width: 1300px;
    margin: 0 auto;
    font-family: "Segoe UI", sans-serif;
    color: #000;
    /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);*/
}

/* Левая часть формы */
.form-block {
    flex: 1 1 300px;
}

.form-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.form-block label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

.form-block select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d0d8d0;
    background: #fff;
    font-size: 14px;
}

.form-block input[type="range"] {
    width: 100%;
    appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #c8d6c3;
    outline: none;
}

.form-block input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b713f;
    cursor: pointer;
    border: none;
}

#duration-value {
    font-weight: bold;
    color: #000;
    font-size: 14px;
}

#advance-value {
    font-weight: bold;
    color: #000;
    font-size: 14px;
}

.form-description {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
}

/* Правая часть с ценой */
.price-block {
    flex: 1 1 250px;
    background: #3b713f; /* насыщенный зелёный */
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.price-block p {
    margin: 0;
}

.price-block hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.3);
}

#rental-price {
    font-size: 28px;
    font-weight: bold;
}

#open-modal {
    background: #000;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#open-modal:hover {
    background: #222;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    margin: 100px auto;
    border-radius: 15px;
    position: relative;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #3b713f;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 20px;
    color: #666;
}

#trailer-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#trailer-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

#trailer-form button {
    background: #3b713f;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

#trailer-form button:hover {
    background: #2f5b34;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
    .trailer-rental-wrapper {
        flex-direction: column;
    }
}

/* Контейнер кастомного селекта */
.custom-select {
    position: relative;
    user-select: none;
    width: 100%;
    font-size: 14px;
}

/* Видимая часть */
.custom-select-trigger {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d0d8d0;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.custom-select-trigger::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%233b713f' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
}

/* Опции */
.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 10;
}
.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-options {
    display: flex;
    flex-direction: column; /* Элементы в столбик */
    align-items: stretch; /* Чтобы каждый был на всю ширину */
    gap: 0; /* убираем лишние зазоры */
}

.custom-option {
    display: block; /* Каждый элемент блочный */
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #eee; /* разделитель между пунктами */
}

.custom-option:last-child {
    border-bottom: none; /* убираем линию у последнего */
}

.custom-option:hover {
    background: #3b713f;
}
