@charset "UTF-8";
/*
Author: Max*/

.m_chat_start_image_preview {
    position: relative;
    width: 200px;
    height: 200px;
    margin-top: 12px;
}

.m_chat_start_image_preview[hidden] {
    display: none;
}

.m_chat_start_image_preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.m_chat_start_image_remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
}

.m_chat_start_image_remove:hover {
    background: #000;
}

.m_chat_offer_saved_image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.m_chat_offer_form,
.m_chat_profile_offer {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.m_chat_offer_form form {
    display: grid;
    gap: 18px;
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.m_chat_offer_form p,
.m_chat_offer_form label {
    margin: 0;
}

.m_chat_offer_form label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
}

.m_chat_offer_form select,
.m_chat_offer_form input[type="file"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

.m_chat_offer_form select:focus,
.m_chat_offer_form input[type="file"]:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.m_chat_form_field,
.m_chat_offer_image_field {
    display: grid;
    gap: 7px;
}

.m_chat_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.m_chat_notice,
.m_chat_error {
    margin: 0 0 16px;
    padding: 12px 15px;
    border-radius: 10px;
}

.m_chat_notice {
    background: #e8f7ed;
}

.m_chat_error {
    background: #fdeaea;
}

.m_chat_start_image_preview {
    position: relative;
    width: min(260px, 100%);
    overflow: hidden;
    border-radius: 14px;
}

.m_chat_start_image_preview img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.m_chat_start_image_remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.m_chat_offers_grid {
    display: grid;
    gap: 20px;
}

.m_chat_columns_1 { grid-template-columns: minmax(0, 1fr); }
.m_chat_columns_2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m_chat_columns_3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m_chat_columns_4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m_chat_columns_5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.m_chat_columns_6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.m_chat_offer_card {
    overflow: hidden;
    border-radius: 18px;
    background: #111;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.m_chat_offer_card_media {
    position: relative;
    min-height: 330px;
    aspect-ratio: 4 / 5;
    background: #222;
}

.m_chat_offer_card_image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m_chat_offer_card_overlay {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.m_chat_offer_card_text {
    min-width: 0;
    flex: 1;
}

.m_chat_offer_card_text > :first-child {
    margin-top: 0;
}

.m_chat_offer_card_text > :last-child {
    margin-bottom: 0;
}

.m_chat_offer_card_name,
.m_chat_offer_card_category {
    margin: 0;
    color: inherit;
}

.m_chat_offer_card_name {
    font-size: 1.1rem;
    line-height: 1.25;
}

.m_chat_offer_card_category {
    margin-top: 4px;
    opacity: 0.82;
    font-size: 0.9rem;
}

.m_chat_offer_card_facts {
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
}

.m_chat_offer_card_fact {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

.m_chat_offer_card_fact strong,
.m_chat_offer_card_fact small {
    display: block;
    line-height: 1.05;
}

.m_chat_offer_card_fact strong {
    font-size: 1rem;
}

.m_chat_offer_card_fact small {
    margin-top: 3px;
    font-size: 0.72rem;
}

@media (max-width: 1100px) {
    .m_chat_columns_4,
    .m_chat_columns_5,
    .m_chat_columns_6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .m_chat_columns_2,
    .m_chat_columns_3,
    .m_chat_columns_4,
    .m_chat_columns_5,
    .m_chat_columns_6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .m_chat_offers_grid,
    .m_chat_columns_1,
    .m_chat_columns_2,
    .m_chat_columns_3,
    .m_chat_columns_4,
    .m_chat_columns_5,
    .m_chat_columns_6 {
        grid-template-columns: minmax(0, 1fr);
    }

    .m_chat_offer_form form {
        padding: 18px;
    }

    .m_chat_offer_card_overlay {
        align-items: center;
        padding: 14px;
    }

    .m_chat_offer_card_fact {
        width: 58px;
        height: 58px;
    }
}

.m_chat_offer_card_media {
    position: relative;
}

.m_chat_admin_delete_offer {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    margin: 0;
}

.m_chat_admin_delete_offer_button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.m_chat_admin_delete_offer_button:hover,
.m_chat_admin_delete_offer_button:focus {
    background: #c62828;
    color: #fff;
}

#m_chat_offer_text {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.4;
}

.m_chat_profile_layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.m_chat_profile_left {
    flex: 0 0 380px;
    min-width: 0;
}

.m_chat_profile_right {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 500px;
    padding: 20px;
    border: 1px solid #dddddd;
    border-radius: 12px;
    background: #ffffff;
}

@media (max-width: 800px) {
    .m_chat_profile_layout {
        flex-direction: column;
    }

    .m_chat_profile_left,
    .m_chat_profile_right {
        width: 100%;
        flex-basis: auto;
    }
}

.m_chat_panel {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.m_chat_panel_header {
    padding-bottom: 15px;
    border-bottom: 1px solid #dddddd;
    font-size: 20px;
}

.m_chat_messages {
    flex: 1 1 auto;
    min-height: 340px;
    max-height: 500px;
    padding: 20px 0;
    overflow-y: auto;
}

.m_chat_messages_empty {
    color: #777777;
}

.m_chat_message_form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding-top: 15px;
    border-top: 1px solid #dddddd;
}

.m_chat_message_input {
    flex: 1 1 auto;
    min-height: 80px;
    resize: vertical;
}

.m_chat_send_button {
    flex: 0 0 auto;
}

.m_chat_message {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.m_chat_message_own {
    align-items: flex-end;
}

.m_chat_message_other {
    align-items: flex-start;
}

.m_chat_message_bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    background: #eeeeee;
    overflow-wrap: anywhere;
}

.m_chat_message_own .m_chat_message_bubble {
    background: #d9ecff;
}

.m_chat_message_time {
    margin-top: 4px;
    font-size: 11px;
    color: #777777;
}

.m_chat_emoji_button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.m_chat_emoji_button:hover {
    transform: scale(1.15);
}

.m_chat_emoji_button:active {
    transform: scale(0.95);
}

.m_chat_emoji_button:focus {
    outline: none;
}