/* =========================================================
   ОСНОВА
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;
}

#map {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;
}


/* =========================================================
   ПАНЕЛЬ
   ========================================================= */

.place-panel {
    position: fixed;

    top: 20px;
    right: 20px;

    width: 360px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);

    overflow-y: auto;

    box-sizing: border-box;

    padding: 22px;

    background: #ffffff;
    color: #111111;

    border-radius: 16px;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.30);

    z-index: 999999;

    font-family: Arial, sans-serif;

    text-align: left;
}


/* =========================================================
   ЗАГОЛОВОК
   ========================================================= */

.place-panel h2 {
    margin: 0 40px 22px 0;

    font-size: 24px;
    line-height: 1.2;

    text-align: left;
}


/* =========================================================
   ОБЫЧНЫЙ ТЕКСТ
   ========================================================= */

.place-panel p {
    margin: 0 0 15px;

    font-size: 16px;
    line-height: 1.5;

    text-align: left;
}


/* =========================================================
   ИМЯ НА КАРТЕ
   ========================================================= */

.place-panel .place-author {
    display: block;

    width: 100%;

    margin: 0 0 16px !important;

    font-size: 18px;
    font-weight: 600;

    line-height: 1.35;

    text-align: left;
}


/* =========================================================
   ТЕКСТ ЗАПИСИ
   ========================================================= */

.place-panel .place-text {
    display: block;

    width: 100%;

    margin: 16px 0 22px !important;

    font-size: 17px;
    line-height: 1.5;

    white-space: pre-wrap;
    word-break: break-word;

    text-align: left;
}


/* =========================================================
   КНОПКА ЗАКРЫТИЯ
   ========================================================= */

.place-panel .close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #eeeeee;
    color: #111111;

    font-size: 24px;
    line-height: 36px;

    text-align: center;

    cursor: pointer;
}

.place-panel .close:hover {
    background: #e5e5e5;
}


/* =========================================================
   ФОРМА
   ========================================================= */

.place-panel form {
    display: flex;

    flex-direction: column;

    gap: 14px;

    width: 100%;

    margin: 0;

    text-align: left;
}


/* =========================================================
   ПОДПИСИ ПОЛЕЙ
   ========================================================= */

.form-label {
    display: block;

    margin: 2px 0 -6px;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.3;

    color: #555555;

    text-align: left;
}


/* =========================================================
   ИМЯ
   ========================================================= */

.place-panel input[type="text"] {
    display: block;

    width: 100%;
    height: 52px;

    box-sizing: border-box;

    margin: 0;
    padding: 0 16px;

    border: 2px solid #d0d0d0;
    border-radius: 12px;

    background: #ffffff;
    color: #111111;

    font-family: Arial, sans-serif;
    font-size: 17px;

    outline: none;
}

.place-panel input[type="text"]:focus {
    border-color: #111111;
}


/* =========================================================
   TEXTAREA
   ========================================================= */

.place-panel textarea {
    display: block;

    width: 100%;
    min-height: 130px;

    box-sizing: border-box;

    margin: 0;
    padding: 14px 16px;

    border: 2px solid #d0d0d0;
    border-radius: 12px;

    background: #ffffff;
    color: #111111;

    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1.45;

    resize: vertical;

    outline: none;
}

.place-panel textarea:focus {
    border-color: #111111;
}


/* =========================================================
   PLACEHOLDER
   ========================================================= */

.place-panel input::placeholder,
.place-panel textarea::placeholder {
    color: #999999;

    opacity: 1;
}


/* =========================================================
   ЗАГРУЗКА ФОТО
   ========================================================= */

.place-panel input[type="file"] {
    display: block;

    width: 100%;

    box-sizing: border-box;

    margin: 0;

    font-family: Arial, sans-serif;
    font-size: 15px;
}


/* =========================================================
   ПРЕВЬЮ ФОТО В ФОРМЕ
   ========================================================= */

.place-panel .preview {
    display: block;

    width: 100%;
    max-width: 100%;

    max-height: 260px;

    margin: 0;

    object-fit: contain;

    border-radius: 12px;
}


/* =========================================================
   ФОТО СОХРАНЁННОЙ ЗАПИСИ
   ========================================================= */

.place-panel .place-photo {
    display: block;

    width: auto;
    max-width: 100%;
    max-height: 500px;

    margin: 10px auto 22px;

    object-fit: contain;

    border-radius: 12px;
}


/* =========================================================
   КНОПКА SUBMIT
   ========================================================= */

.place-panel button[type="submit"] {
    display: block;

    width: 100%;
    min-height: 56px;

    box-sizing: border-box;

    margin: 4px 0 0;
    padding: 12px 18px;

    border: 0;
    border-radius: 12px;

    background: #111111;
    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;

    cursor: pointer;
}

.place-panel button[type="submit"]:hover {
    opacity: 0.9;
}

.place-panel button[type="submit"]:disabled {
    opacity: 0.5;

    cursor: default;
}


/* =========================================================
   КНОПКА ПЕРЕХВАТА
   ========================================================= */

.takeover-button {
    display: block;

    width: 100%;
    min-height: 56px;

    box-sizing: border-box;

    margin: 4px 0 0;
    padding: 12px 18px;

    border: 0;
    border-radius: 12px;

    background: #111111;
    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 17px;
    font-weight: 600;

    cursor: pointer;
}

.takeover-button:hover {
    opacity: 0.9;
}


/* =========================================================
   ИНФОРМАЦИЯ О ЦЕНЕ
   ========================================================= */

.price-info {
    margin-top: 10px;
    margin-bottom: 15px;
}


/* =========================================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================= */

@media (max-width: 600px) {

    .place-panel {
        top: 10px;
        right: 10px;
        left: 10px;

        width: auto;
        max-width: none;

        max-height: calc(100vh - 20px);

        padding: 18px;

        border-radius: 16px;
    }


    .place-panel h2 {
        font-size: 24px;
    }


    .place-panel input[type="text"],
    .place-panel textarea {
        font-size: 16px;
    }


    .place-panel .place-photo {
        max-height: 400px;
    }

}

/* =========================================================
   ФИНАЛЬНОЕ ВЫРАВНИВАНИЕ КАРТОЧКИ
   ========================================================= */

/* Имя автора */
.place-panel .place-author {
    display: block !important;

    width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    text-align: left !important;
}


/* Текст записи */
.place-panel .place-text {
    display: block !important;

    width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    text-align: left !important;

    align-self: flex-start !important;
}


/* Фотография */
.place-panel .place-photo {
    display: block !important;

    width: auto !important;

    max-width: 90% !important;
    max-height: 500px !important;

    margin: 10px auto 22px !important;

    object-fit: contain;

    border-radius: 12px;
}