/* === Стили модального окна === */

/* Overlay */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.in {
    opacity: 0.5;
}

/* Modal wrapper */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal.in {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0 auto;
    max-width: 800px;
    padding: 110px 15px;
}

/* Modal layout: grid 2 columns */
.modal-content {
    display: grid !important;
    grid-template-columns: 1fr 1.5fr;
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    outline: 0;
    overflow: hidden;
}

/* Photo section */
.modal-form-description {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    overflow: hidden;
}

.modal-form-description__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.modal-footnote {
    position: absolute;
    bottom: 30px;
    left: 30px;
    margin-top: auto;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    z-index: 10;
}

/* Form section */
.modal-content .modal-body {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.modal-content h4 {
    text-align: left;
    margin: 15px 0 30px;
    font-size: 24px;
    font-weight: 600;
}

.modal-content .ajax-contact-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-around;
}

.modal-content .ajax-contact-form .form-group {
    width: 100%;
    text-align: left;
}

.modal-content input[type=text],
.modal-content input[type=tel] {
    padding: 13px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.modal-content textarea {
    padding: 13px;
    width: 100%;
    max-width: 100%;
    resize: none;
    box-sizing: border-box;
}

.modal-content input[type=checkbox] {
    margin: 0 !important;
    flex-shrink: 0;
    width: 16px !important;
    height: 16px;
    border-color: #e6e6e6;
}

.modal-content input[type=checkbox] ~ label {
    text-align: left;
    margin-left: 8px;
    font-size: 10px;
    line-height: 1.3;
    font-weight: normal;
}

/* Close button */
.modal .close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0;
    padding: 0;
    grid-column: 1 / -1;
}

.modal .close::before,
.modal .close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 1px;
    background-color: #333;
}

.modal .close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal .close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Submit button */
.btnClaim {
    z-index: 100;
    width: 100%;
    padding: 12px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.btnClaim:hover {
    background-color: #005a87;
}

/* Form message */
.form-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

.form-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.form-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Responsive */
@media (max-width: 575px) {
    .modal-content {
        grid-template-columns: 1fr;
    }

    .modal-form-description {
        display: none;
    }

    .modal-dialog {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }

    .modal-content {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
}

@media (max-width: 1040px) {
    .modal-dialog {
        padding: 30px 15px;
    }
}

/* Body when modal is open */
body.modal-open {
    overflow: hidden;
}
