/* MESSAGING STYLES */
.message-form-container {
    margin: 20px 0;
}

.message-input {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #333333;
    margin-bottom: 10px;
}

.send-message {
    padding: 10px 20px;
    background: #c03732 !important;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.send-message:hover {
    background: #c03732 !important;
}

.messages-list {
    list-style: none;
    padding: 0;
    max-width: 400px;
    margin: 0 0 0 0rem !important;
}

.messages-list li {
    position: relative;
    padding: 15px;
    margin: 15px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.message-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 100%;
}

.message-photo-container {
    width: 80px;
    height: 80px;
    min-width: 80px;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
    background: #f5f5f5;
}

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

.message-info {
    flex-grow: 1;
    min-width: 0;
}

.message-partner-name {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1.15em;
    color: #222;
}

.message-preview {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 0.8em;
    color: #999;
}

/* Red dot for unread messages */
.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

/* CONVERSATION VIEW STYLES */
.conversation-view {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    height: auto;
    border: none;
    z-index: 990;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.message-bubble {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.incoming {
    align-self: flex-start;
    background: #383939ed;
    color: white;
    border-bottom-left-radius: 4px;
}

.outgoing {
    align-self: flex-end;
    background: #731411;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content {
    margin-bottom: 5px;
}

.message-time {
    font-size: 0.7em;
    opacity: 0.8;
    text-align: right;
}

.read-status {
    margin-left: 5px;
}

.message-composer {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #ffffff;
}

.new-message-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #333333 !important;
    border-radius: 20px;
    resize: none;
    max-height: 120px;
    line-height: 1.2em;
}

.chat-send {
    margin-left: 8px;
    background: #f9f9f9 !important;
    color: #333333 !important;
    border: 2px solid #333333 !important;
    border-radius: 13px !important;
    cursor: pointer;
    padding: 10px 15px !important;
}

.messages-anchor {
    float: left;
    clear: both;
}

/* Conversation header styles */
.conversation-header {
    display: flex;
    align-items: center;
    padding: 8px !important;
    background: #f9f9f9 !important;
    border-bottom: 1px solid #ffffff !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.conversation-header a {
    margin-right: 15px;
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
}

.conversation-header a:hover {
    color: #c03732;
}

.partner-info {
    display: flex;
    align-items: center;
}

.partner-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}
