:root {
    --primary: #dc9a4e;
    --primary-dark: #a16116;
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.form-section {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--box-shadow);
    padding: 35px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary);
}
.form-section label{
    font-size: 16px;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--primary);
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    font-size: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group label {
    font-weight: bold;
}

select, input, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 16px;
    background-color: #f9f9f9;
    transition: var(--transition);
    font-family: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
    background: white;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.one-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.map-container {
    height: 450px;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 30px 0;
    box-shadow: var(--box-shadow);
    background: #f5f5f5;
    border: 1px solid #eee;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition);
    display: block;
    margin: 30px auto;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(229, 57, 53, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.2);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.checkbox-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 70px;
    padding: 15px 20px 15px 54px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid #e0e0e0;
    transition: var(--transition);
    cursor: pointer;
}

.checkbox-item:hover {
    border-color: var(--primary);
    background-color: #fffafa;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}

.checkbox-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    height: 22px;
    width: 22px;
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    border-radius: 5px;
    transition: var(--transition);
}

.checkbox-item:hover .checkmark {
    border-color: var(--primary);
    background-color: #fff;
}

.checkbox-item input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-item input:checked ~ .checkmark:after {
    display: block;
    animation: checkAnim 0.3s forwards;
}

@keyframes checkAnim {
    0% { transform: scale(0) rotate(45deg); opacity: 0; }
    100% { transform: scale(1) rotate(45deg); opacity: 1; }
}

.checkbox-label {
    display: block;
    font-weight: 700;
    font-size: 18px;
    color: #333;
    transition: var(--transition);
    line-height: 1.4;
}

.checkbox-item:hover .checkbox-label {
    color: #000;
}

.checkbox-item input:checked ~ .checkbox-label {
    color: var(--primary);
    font-weight: 600;
}

.hidden {
    display: none;
}

.result-card {
    background: white;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 35px;
    animation: fadeIn 0.7s ease-out;
    box-shadow: var(--box-shadow);
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    margin-left: 2px;
    border-bottom: 1px solid #f5f5f5;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #666;
}

.result-value {
    font-weight: 600;
    color: #222;
}

.result-total {
    font-size: 28px;
    color: var(--primary);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.storage-info, .flex-info {
    font-size: 14px;
    margin-top: 5px;
    color: #555;
    font-style: italic;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 80%;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.modal-btn {
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-close {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-continue {
    background: #e53935;
    color: white;
    border: none;
}

.btn-close:hover {
    background: #e0e0e0;
}

.btn-continue:hover {
    background: #c62828;
}

@media (max-width: 768px) {
    .two-column, .one-column {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 25px 20px;
    }

    .btn {
        width: 100%;
        padding: 16px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-item {
        min-height: 60px;
        padding: 12px 15px 12px 54px;
    }

    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-btn {
        width: 100%;
    }
}
/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Разрешаем прокрутку внутри модального окна */
    background-color: rgba(0,0,0,0.4);
}


.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Контейнер для контента с прокруткой */
#modal-result-content {
    overflow-y: auto;
    max-height: 60vh;
    padding: 15px 0;
}

/* Кнопки внизу окна */
.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-btn {
        width: 100%;
    }
}
.error-message {
    color: #e53935;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15) !important;
}
.datetime-container {
    display: flex;
    gap: 10px;
}

.datetime-container input {
    flex: 1;
}

@media (max-width: 768px) {
    .datetime-container {
        flex-direction: column;
    }
}
