/* Admin Conversations Page Styles */

/* Filter Bar */
.aichat-filter-bar {
    background: #fff;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.aichat-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.aichat-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.aichat-filter-group label {
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.aichat-filter-group input[type="text"],
.aichat-filter-group input[type="date"],
.aichat-filter-group select {
    min-width: 150px;
}

.aichat-filter-buttons {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: flex-end;
}

.aichat-filter-buttons label {
    display: none;
}

/* Action Bar */
.aichat-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
}

.aichat-action-right {
    display: flex;
    gap: 10px;
}

/* Table Styles */
.aichat-conversations-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: auto;
}

.aichat-admin-container {
    max-width: 100% !important;
    width: 100%;
}

.aichat-admin-wrap {
    margin-right: 20px;
}

.aichat-conversations-table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.aichat-conversations-table .check-column {
    width: 30px;
    padding: 10px;
}

.aichat-conversations-table .column-id {
    width: 50px;
}

.aichat-conversations-table .column-visitor {
    width: auto;
    min-width: 140px;
}

.aichat-conversations-table .column-contact {
    width: auto;
    min-width: 180px;
}

.aichat-conversations-table .column-location {
    width: auto;
    min-width: 130px;
}

.aichat-conversations-table .column-messages {
    width: 80px;
    text-align: center;
}

.aichat-conversations-table .column-last-message {
    width: auto;
    min-width: 220px;
}

.aichat-conversations-table .column-status {
    width: 110px;
}

.aichat-conversations-table .column-date {
    width: 120px;
}

.aichat-conversations-table .column-actions {
    width: 90px;
}

/* Visitor Info */
.visitor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visitor-ip {
    color: #666;
    font-size: 11px;
    font-family: monospace;
}

/* Contact Items */
.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    margin-bottom: 3px;
}

.contact-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #666;
}

.contact-item a {
    text-decoration: none;
    color: #0073aa;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Message Count */
.message-count {
    display: inline-block;
    background: #e0e0e0;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

/* Last Message Preview */
.last-message-preview {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
    color: #555;
}

.sender-icon {
    font-size: 14px;
}

.message-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-time {
    color: #999;
    font-size: 11px;
    display: block;
    margin-top: 3px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Date Info */
.date-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-info small {
    color: #666;
    font-size: 11px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .button {
    padding: 0 8px;
    min-height: 30px;
    line-height: 28px;
}

.action-buttons .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.aichat-delete-single {
    color: #dc3545 !important;
}

.aichat-delete-single:hover {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

/* No Data */
.no-data {
    color: #999;
}

/* Pagination */
.aichat-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.pagination-links {
    display: flex;
    gap: 5px;
}

/* No Results */
.aichat-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.aichat-no-results .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #ccc;
    margin-bottom: 20px;
}

.aichat-no-results h3 {
    margin: 0 0 10px;
    color: #333;
}

/* Modal */
.aichat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aichat-modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
}

.aichat-modal-content h3 {
    margin-top: 0;
}

.aichat-modal-content select {
    width: 100%;
    margin: 15px 0;
}

.aichat-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Title Count */
.title-count {
    font-size: 14px;
    color: #ffffff;
    font-weight: normal;
}

/* Bulk Delete Button */
#aichat-bulk-delete:not(:disabled) {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

#aichat-bulk-delete:not(:disabled):hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .aichat-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .aichat-filter-group input,
    .aichat-filter-group select {
        width: 100%;
    }
}
