.start_message .wt-offersmessages ul li:first-child {
    background: transparent;
    width: 100%;
    padding: 1rem;
}

.wt-offersmessages ul li.original-view-message .wt-messages.wt-dashboardscrollbar {
    height: auto;
}

.messaging-holder-section {
    text-align: center;
    margin: 0 auto;
}

a.wt-btnsendmsg {
    text-align: center;
    margin: 1rem auto;
    display: block;
}

.original-view-message .wt-iconbox {
    height: auto;
}

.wt-replaybox .form-control {
    font-size: 1rem;
}

.wt-btnsendmsg:hover {
    background: #bd3232;
}

.wt-replaybox .form-control {
    color: black;
    line-height: 1.5rem;    
}

.wt-offerermessage.self_message .wt-description p {
    background: rgb(0, 153, 255);
    color: #fff;
}

.wt-offerermessage figure {
    bottom: 0rem;
    height: 4rem;
    width: 6%;
}

.wt-offerermessage .wt-description p {
    max-width: 100%;
}

.wt-dashboardbox.wt-messages-holder {
    background: #333;
}

.messages_view .wt-dashboardboxtitle h2 {
    color: #fff;
}

.messages_view .wt-dashboardboxtitle {
	border-bottom: 1px solid #0f0f0f;
}

.wt-replaybox {
    border: 1px solid transparent;
}

.wt-offersmessages ul li .wt-messages::before {
    background: transparent;
}

.original-view-message .wt-iconbox {
	border-top: transparent;
}

.original-view-message .form-control {
	margin-bottom: 0;
}

.av-message-thread .mCustomScrollBox:focus {
    box-shadow: none;
}

.av-message-thread .sender-name {
    color: #fff;
    margin: 0;
        margin-bottom: 0px;
    padding: 0;
    font-size: 1rem;
    float: left;
    width: 100%;
    left: 0;
    right: 0;
    text-align: left;
    margin-bottom: 0.5rem;
}

.av-message-thread .wt-description .sender-name a:hover {
    color: rgb(66,133,244);
}

.av-message-thread .wt-description .sender-name a {
    color: #fff;
}


.wt-offerermessage, .wt-memessage {
    padding: 0 1rem;
}

.x-admin-badge {
    height: 1rem;
}


.wt-offersmessages ul li {
    width: 100%;
}

.wt-offersmessages ul li.list-messages {
    background: #333333;
    color: #fff;
}

.wt-offersmessages .wt-ad h3 {
    color: #fff;
    font-weight: bold;
}

.wt-offersmessages .wt-ad span {
    font-size: 0.8rem;
    font-weight: 400;
}

.wt-offersmessages .wt-ad:hover {
    background: rgb(44, 44, 44);
}


.wt-offersmessages .wt-ad {
    border-top: 1px solid rgb(61, 61, 61);
}

.wt-offersmessages .wt-ad:hover {
    background: rgb(44, 44, 44);
    border-top: 1px solid rgb(44, 44, 44);
}

.wt-offersmessages .wt-formsearch {
    background: #333333;
}

.mCustomScrollBox:focus {
    box-shadow: 0 0 black;
}

.wt-offersmessages .wt-ad span {
    color: #fff;
}

.listing_view .wt-dashboardboxtitle h2 {
    text-align: center;
}

.see-listing .wt-btn:hover {
    box-shadow: none;
    background: #d54a44;
}

.messages_list_extra {
    color: #fff;
}



/* Message Photo Upload Styles */
.wt-message-photo-upload {
    margin-bottom: 10px;
}

.message-photo-select {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.message-photo-select:hover {
    background: #e9ecef;
}

.photo-preview-container {
    position: relative;
    display: inline-block;
}

.remove-photo-preview {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-photo-preview:hover {
    background: #c82333;
}

.photo-upload-icon {
    cursor: pointer;
    padding: 5px;
    color: #666;
    margin-right: 10px;
}

.photo-upload-icon:hover {
    color: #333;
}

/* Drag and drop styles */
.wt-labelgroup.drag-over {
    border: 2px dashed #007bff;
    background-color: #f8f9ff;
}

.upload-status.error {
    color: #dc3545;
}

.upload-status.success {
    color: #28a745;
}

label span.message-photo-select {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}

label span.message-photo-select:hover {
    background: transparent;
    box-shadow: none;
    color: #007bff;
}

.form-group-label .wt-labelgroup {
    padding: 0;
    margin: 0.5rem 0rem;
}

.wt-message-photo-upload span.max-text {
    display: block;
    background: transparent;
    color: #ffffff;
    font-size: 0.8rem;
    font-style: italic;
}

.wt-message-photo-upload span.max-text:hover {
    background: transparent;
}

.max-text strong {
    color: #fff;
}


/* Updated attachment preview styles for single row layout */
.message-attachments-preview {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    display: block;
}

.attachments-header {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Container for all attachment items in a row */
.attachments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.attachment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #333;
    border-radius: 5px;
    padding: 8px;
    position: relative;
    min-width: 80px;
    max-width: 100px;
    flex-shrink: 0;
}

.attachment-preview {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    border-radius: 3px;
    overflow: hidden;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.attachment-info {
    text-align: center;
    color: #ccc;
    width: 100%;
}

.file-name {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 2px;
    word-break: break-word;
    line-height: 1.2;
    max-height: 24px;
    overflow: hidden;
}

.file-size {
    font-size: 9px;
    color: #999;
}

.remove-attachment {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.remove-attachment:hover {
    background: #ff6666;
}

.file-icon {
    font-size: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .attachments-container {
        flex-wrap: wrap;
    }
    
    .attachment-item {
        min-width: 70px;
        max-width: 85px;
    }
    
    .attachment-preview {
        width: 50px;
        height: 50px;
    }
}


/* Message attachments styling */
.message-attachments {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

.image-attachment {
    max-width: 200px;
}

.attachment-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #444;
    cursor: pointer;
    transition: opacity 0.3s;
}

.attachment-image:hover {
    opacity: 0.8;
}

.file-attachment {
    background: #333;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}

.attachment-link {
    text-decoration: none;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.attachment-link:hover {
    color: #fff;
    text-decoration: none;
}

.attachment-name {
    font-size: 12px;
    word-break: break-word;
}

.file-attachment i {
    color: #999;
    font-size: 14px;
}

/* For self messages - adjust attachment styling */
.self_message .message-attachments {
    justify-content: flex-end;
}

.self_message .attachment-item {
    align-self: flex-end;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .attachment-image {
        max-height: 120px;
    }
    
    .image-attachment {
        max-width: 150px;
    }
}
/* 
.attachment-image {
    width: 5%;
} */

/* Ensure message attachments display correctly */
.wt-description .message-attachments {
    margin-top: 10px;
    margin-bottom: 10px;
    display: block;
    width: 100%;
}

.message-attachments .attachment-image {
    max-width: 200px;
    height: auto;
    border-radius: 5px;
    border: 1px solid #444;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

/* Make sure attachments appear after the message text */
.wt-description p.msg-p {
    margin-bottom: 10px;
}

.wt-description .message-attachments + .clearfix {
    margin-top: 10px;
}

.wt-description .message-attachments a {
    display: inline;
    margin: 0;
}

/* REMOVE or COMMENT OUT this rule that's causing centering */
/*
.attachment-image {
    width: 5%;
}
*/

/* UPDATE: Fix the message attachments positioning */
.wt-description .message-attachments {
    margin-top: 10px;
    margin-bottom: 10px;
    display: block;
    width: 100%;
    text-align: left; /* Add this to override centering */
}

.message-attachments {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start; /* Ensure left alignment */
}

.message-attachments .attachment-image {
    max-width: 70px;
    width: auto;
    height: auto;
    border-radius: 5px;
    border: 1px solid #444;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    margin: 0;
}

.wt-description .message-attachments a {
    display: inline-block; /* Change from inline to inline-block */
    margin: 0;
    text-align: left; /* Ensure left alignment */
}

/* For self messages - keep attachments aligned to the right */
.self_message .message-attachments {
    justify-content: flex-end;
   /* text-align: right; */
}

.self_message .attachment-item {
    align-self: flex-end;
}

/* Remove any centering from parent elements */
.wt-description {
    text-align: left;
}

/* Ensure the message container doesn't center content */
.wt-offerermessage .wt-description {
    text-align: left;
}

p.available-credit-deal-room {
    font-size: 1rem;
    font-weight: normal;
}