/* Modal Overlay */
.modal_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

.modal_overlay.active {
    display: flex;
}

/* Modal Form Container */
.modal_formular {
    position: relative;
    width: 555px;
    max-width: 100%;
    background-color: #FFFFFF;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

/* Close Button */
.modal_zavrit {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modal_zavrit:hover {
    transform: scale(1.1);
}

/* Modal Header */
.modal_nadpis {
    font-family: Roboto, sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 100%;
    color: #0B3D77;
    margin: 0 0 16px 0;
}

.modal_popis {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #666666;
    margin: 0 0 32px 0;
}

/* Apartment Info */
.modal_byt_info {
    display: flex;
    gap: 16px;
    padding: 20px;
    background-color: #F6F2F0;
    border-radius: 10px;
    margin-bottom: 32px;
}

.modal_byt_obrazek {
    width: 120px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.modal_byt_detaily {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal_byt_nazev {
    font-family: Roboto, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #0B3D77;
    margin: 0;
}

.modal_byt_parametry {
    display: flex;
    gap: 16px;
}

.modal_byt_parametr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #0B3D77;
}

.modal_byt_parametr svg {
    width: 16px;
    height: 16px;
}

.modal_byt_cena {
    font-family: Roboto, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #0B3D77;
}

/* Form */
.modal_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal_form_radek {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal_form_pole,
.modal_form_pole_plne {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal_form_pole label,
.modal_form_pole_plne label {
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #0B3D77;
}

.modal_form_pole input,
.modal_form_pole_plne input,
.modal_form_pole_plne textarea {
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #333333;
    transition: border-color 0.3s ease;
}

.modal_form_pole input:focus,
.modal_form_pole_plne input:focus,
.modal_form_pole_plne textarea:focus {
    outline: none;
    border-color: #4CA7DD;
}

.modal_form_pole input::placeholder {
    color: #999999;
}

.modal_form_pole_plne textarea {
    resize: vertical;
    min-height: 100px;
}

/* Documents Section */
.modal_dokumenty {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background-color: #F6F2F0;
    border-radius: 10px;
}

.modal_dokumenty_nadpis {
    font-family: Roboto, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #0B3D77;
    margin: 0;
}

.modal_dokument_radek {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.modal_dokument_label {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #0B3D77;
}

.modal_dokument_soubor {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #FFFFFF;
    border-radius: 6px;
    flex: 1;
}

.modal_dokument_nazev {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #4CA7DD;
    flex: 1;
}

.modal_dokument_smazat {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal_vybrat_soubor {
    padding: 8px 16px;
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #0B3D77;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal_vybrat_soubor:hover {
    background-color: #F6F2F0;
    border-color: #0B3D77;
}

/* Consent */
.modal_souhlas {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.modal_souhlas input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal_souhlas label {
    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #666666;
    line-height: 150%;
}

.modal_souhlas label a {
    color: #4CA7DD;
    text-decoration: underline;
}

/* Submit Button */
.modal_odeslat {
    width: 100%;
    padding: 16px;
    background-color: #4CA7DD;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-family: Roboto, sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal_odeslat:hover {
    background-color: #3a8fc7;
}

/* Success Modal */
.modal_uspech {
    position: relative;
    width: 600px;
    max-width: 100%;
    background-color: #FFFFFF;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal_uspech_obsah {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.modal_uspech_ikona {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal_uspech_ikona svg {
    width: 120px;
    height: 120px;
}

.modal_uspech_nadpis {
    font-family: Roboto, sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 120%;
    color: #0B3D77;
    margin: 0;
}

.modal_uspech_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background-color: #FFFFFF;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-family: Roboto, sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #4CA7DD;
    text-decoration: none;
    transition: all 0.3s ease;
}

.modal_uspech_button:hover {
    background-color: #F6F2F0;
    border-color: #4CA7DD;
}

.modal_uspech_button svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal_formular {
        width: 100%;
        padding: 24px;
    }
    
    .modal_form_radek {
        grid-template-columns: 1fr;
    }
    
    .modal_byt_info {
        flex-direction: column;
    }
    
    .modal_byt_obrazek {
        width: 100%;
        height: auto;
    }
}
