/* TAB - CONVERSATIONS */

/* Markdown Formatting */
.message-text h1 {
    font-size: 22px;
    margin: 0px;
    font-weight: 600;
}

.message-text h2 {
    font-size: 18px;
    margin: 0px;
    font-weight: 600;
}

.message-text h3 {
    font-size: 16px;
    margin: 0px;
    font-weight: 600;
}

.message-text strong {
    font-weight: 600;
    color: #2c3338;
}

.message-text em {
    font-style: italic;
    color: #2c3338;
}

.message-text {
    line-height: 1.6;
}

/* Product Link Container */
.product-link-container {
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    background-color: #fff;
    max-width: 300px;
    padding: 0;
    font-size: 0; 
    line-height: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-link-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-link {
    display: block;
    text-decoration: none;
}

.product-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 8px 8px 0 0;
    position: relative; 
    top: 0;
}

.product-info {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
}

.product-description {
    font-weight: 400;
    color: #333;
    line-height: 1.5;
    display: block;
    margin-bottom: 10px;
}

.product-price {
    font-weight: 500;
    color: #3d3e3e;
    padding: 6px;
    border-top: 1px solid #eeebeb;
    display: block;
    padding-top: 10px;
}

/* Conversation Section */
.conversation-history-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(58, 79, 102, 0.08);
}

/* Settings Container */
.settings-container {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

/* Auto Delete Section */
.auto-delete-section {
    background: #fbfbfb;
    padding: 25px;
    border: 1px solid #EFF2F6;
    border-radius: 8px;
    margin: 15px 0;
    flex: 1;
    max-width: 50%;
}

.auto-delete-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.auto-delete-section h3 .dashicons {
    color: #0968fe;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.auto-delete-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auto-delete-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #2c3338;
    padding: 5px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.auto-delete-form label:hover {
    background-color: #f8f9fa;
}

.auto-delete-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    background-color: #fff;
    color: #2c3338;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.auto-delete-form select:hover {
    border-color: #0968fe;
}

.auto-delete-form select:focus {
    border-color: #0968fe;
    box-shadow: 0 0 0 2px rgba(9, 104, 254, 0.1);
}

.auto-delete-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e4e7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auto-delete-form input[type="checkbox"]:checked {
    border-color: #0968fe;
}

.auto-delete-form .button {
    color: #0968fe;
    border-color: #0968fe!important;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.auto-delete-form .button:hover {
    background: #0968fe;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(9, 104, 254, 0.25);
}

.auto-delete-description {
    font-size: 14px;
    color: #646970;
    line-height: 1.6;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    border-left: 4px solid #0968fe;
    margin-top: 20px;
}

.premium-feature-notice.auto-delete-notice {
    flex: 1;
}

.premium-feature-notice.auto-delete-notice h3 {
    color: #2c3338;
    margin-bottom: 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Download Emails Section */
.download-emails-section {
    background: #fbfbfb;
    border: 1px solid #EFF2F6;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    flex: 1;
    max-width: 50%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.download-emails-content {
    width: 100%;
}

.download-emails-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.download-emails-section h3 .dashicons {
    color: #0968fe;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.download-description {
    font-size: 14px;
    color: #646970;
    line-height: 1.6;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    border-left: 4px solid #0968fe;
    margin: 30px 0;
}

#download_emails {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0968fe;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(9, 104, 254, 0.2);
}

#download_emails:hover {
    background: #0755d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(9, 104, 254, 0.25);
}

/* Filter form */
.conversation-filter-form {
    background: #ffffff;
    border: 1px solid #EFF2F6;
    border-radius: 8px;
    padding: 25px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.conversation-filter-form h3 {
    font-size: 16px;
    width: 100%;
    margin: 0 0 15px 0;
    color: #2c3338;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversation-filter-form label {
    font-weight: 500;
    color: #2c3338;
    min-width: 80px;
}

.conversation-filter-form input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3338;
    background-color: #fbfbfb;
    transition: all 0.2s ease;
    width: 160px;
}

.conversation-filter-form input[type="date"]:hover {
    border-color: #0968fe;
}

.conversation-filter-form input[type="date"]:focus {
    outline: none;
    border-color: #0968fe;
    box-shadow: 0 0 0 2px rgba(9, 104, 254, 0.1);
}

.conversation-filter-form .button {
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
}

.conversation-filter-form input[type="submit"].button {
    background: #0968fe;
    color: white;
    border: none;
}

.conversation-filter-form input[type="submit"].button:hover {
    background: #0755d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(9, 104, 254, 0.25);
}

.conversation-filter-form #reset-filter.button {
    color: #2c3338;
    border-color: #e2e4e7;
}

.conversation-filter-form #reset-filter.button:hover {
    background: #f8f9fa;
    border-color: #0968fe;
    color: #0968fe;
}

/* Conversations layout */
.conversations-container {
    padding: 10px;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    margin-top: 20px;
    height: 600px;
    background: #fbfbfb;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #EFF2F6;
}

/* Left sidebar */
.conversations-sidebar {
    background: white;
    border-right: 1px solid #e5e5e5;
    overflow-y: auto;
}

/* Custom scrollbar for conversations list */
.conversations-sidebar::-webkit-scrollbar {
    width: 5px;
}

.conversations-sidebar::-webkit-scrollbar-track {
    background: #fbfbfb;
    border-radius: 2px;
}

.conversations-sidebar::-webkit-scrollbar-thumb {
    background: #e6e6e6;
    border-radius: 2px;
    transition: background 0.2s ease;
}

.conversations-sidebar::-webkit-scrollbar-thumb:hover {
    background: #d3d3d3;
}

.conversations-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: #fbfbfb;
}

.conversation-item.active {
    background-color: #fbfbfb;
}

.user-avatar {
    margin-right: 12px;
}

.user-avatar .avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

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

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
}

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

.timestamp {
    color: #999;
    font-size: 12px;
}

/* Center content */
.conversation-transcript {
    background: white;
    padding: 20px;
    overflow-y: auto;
    border-radius: 8px;
}

/* Custom scrollbar for conversation transcript */
.conversation-transcript::-webkit-scrollbar {
    width: 5px;
}

.conversation-transcript::-webkit-scrollbar-track {
    background: #fbfbfb;
    border-radius: 2px;
}

.conversation-transcript::-webkit-scrollbar-thumb {
    background: #e6e6e6;
    border-radius: 2px;
    transition: background 0.2s ease;
}

.conversation-transcript::-webkit-scrollbar-thumb:hover {
    background: #d3d3d3;
}

.transcript-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-style: italic;
}

.transcript-content {
    height: 100%;
}

/* Message styles */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    max-width: 85%;
}

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
}

.message-avatar .avatar,
.message-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.message-avatar .avatar-initial {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f9ff;
    border: 1px solid #E1EDFF;
    color: #002358;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.message-content-wrapper {
    flex-grow: 1;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    padding: 0 4px;
    gap: 10px;
}

.message.user .message-header {
    justify-content: flex-end;
}

.message.bot .message-header {
    justify-content: flex-start;
}

.message.admin .message-header {
    justify-content: flex-start;
}

.message.user .message-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.role-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.timestamp {
    font-size: 11px;
    color: #999;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
    display: inline-block;
}

.message.user .message-content {
    background-color: #0968fe;
    color: white;
}

.message.bot .message-content {
    background-color: #fbfbfb;
    color: #333;
}

.message.admin .message-content {
    background-color: #f5f9ff;
    color: #002358;
    border: 1px solid #E1EDFF;
}

.message.admin .role-label {
    color: #0968fe;
    font-weight: 700;
}

.message.error .message-content {
    background-color: #fff0f0;
    color: #dc3545;
}

.message-content-wrapper {
    max-width: calc(100% - 52px);
}

.message:last-child {
    padding-bottom: 20px; 
}

.message-text {
    word-break: break-word;
}

.transcript-content .notice-error, div.error{
    border: none!important;
    padding: 0px;
}

/* Right sidebar */
.conversation-details {
    background: white;
    border-radius: 8px;
    overflow-y: auto;
}

/* Custom scrollbar for conversation details */
.conversation-details::-webkit-scrollbar {
    width: 8px;
}

.conversation-details::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.conversation-details::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.conversation-details::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.details-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-style: italic;
}

.details-content {
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

/* User Info Section */
.user-info-section {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.user-avatar-large .avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-info-section h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
}

.user-country, .user-email {
    color: #666;
    margin-bottom: 5px;
}

.user-country.locked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #999;
    cursor: help;
}

.user-country.locked .lock-icon {
    font-size: 16px;
    color: #999;
    transition: color 0.2s ease;
}

.user-country.locked:hover {
    color: #666;
}

.user-country.locked:hover .lock-icon {
    color: #0968fe;
}

/* Additional Info Section */
.additional-info-section {
    margin-bottom: 30px;
}

.additional-info-section h4 {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #333;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-label {
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.info-value.online {
    color: #03B5AA;
}

.info-value.offline {
    color: #9ca3af;
}

.actions {
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    margin-top: auto;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-user {
    width: 100%;
    color: #0968fe!important;
    border-color: #0968fe!important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-user .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.contact-user:hover {
    background: #0968fe !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.contact-user:disabled {
    opacity: 0.5;
    cursor: not-allowed ;
    transform: none ;
    box-shadow: none ;
}

.contact-user-locked {
    display: flex;
    align-items: center;
    color: #999;
    cursor: help;
    padding: 14px 16px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fbfbfb;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.contact-user-locked .lock-icon {
    font-size: 16px;
    color: #999;
    transition: color 0.2s ease;
    position: absolute;
    right: 16px;
}

.contact-user-locked .button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    margin-right: 24px;
}

.contact-user-locked .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.contact-user-locked:hover .lock-icon {
    color: #0968fe;
}

.contact-user-locked:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.download-conversation {
    flex: 1;
    color: #0968fe !important;
    border: none !important;
    background: white !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    border-radius: 0 3px 3px 0 !important;
}

.download-conversation .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.download-conversation:hover {
    background: #0968fe !important;
    color: white !important;
}

.download-conversation:active {
    transform: scale(0.98);
}

/* Download Conversation Wrapper with Integrated Translation */
.download-conversation-wrapper {
    width: 100%;
    margin-bottom: 10px;
}

.integrated-download-button {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    width: 100%;
    border: 1px solid #0968fe;
    border-radius: 4px;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.integrated-download-button:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Translation Icon Button */
.translation-icon-button {
    background: #f8f9fa;
    border: none;
    border-right: 1px solid #0968fe;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 38px;
    border-radius: 3px 0 0 3px;
}

.translation-icon-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #999;
    transition: color 0.3s ease;
}

.translation-icon-button:hover {
    background: #e9ecef;
}

.translation-icon-button:hover .dashicons {
    color: #0968fe;
}

/* Active state when translation is selected */
.translation-icon-button.active {
    background: #f8f9fa;
}

.translation-icon-button.active .dashicons {
    color: #0968fe;
}

/* Translation Dropdown */
.translation-dropdown {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #0968fe;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(9, 104, 254, 0.2);
    z-index: 100;
    transform: translateY(-100%);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(calc(-100% - 5px));
    }
    to {
        opacity: 1;
        transform: translateY(-100%);
    }
}

.translation-dropdown::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.translation-dropdown::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 19px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #0968fe;
}

.translation-language-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
}

.translation-language-select:hover {
    border-color: #0968fe !important;
}

.translation-language-select:focus {
    outline: none;
    border-color: #0968fe;
    box-shadow: 0 0 0 2px rgba(9, 104, 254, 0.1);
}

/* Spinning dashicon for loading state */
.dashicons-spin {
    animation: dashicons-spin 1s linear infinite;
}

@keyframes dashicons-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Contact Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 20px;
    border-radius: 8px;
    width: 50%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto; 
}

.modal-content .description {
    margin-bottom: 20px!important;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

/* Form Elements */
.form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 10px;
}

/* Message Toolbar */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    position: relative;
    padding-top: 10px;
}

.message-toolbar {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    z-index: 1;
    background: #fff;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.emoji-picker-button,
.file-label,
.ai-enhance-button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: color 0.2s;
    padding: 4px;
    height: 30px;
    width: 30px;
}

.emoji-picker-button:hover,
.file-label:hover,
.ai-enhance-button:hover {
    color: #000;
}

.emoji-picker-button svg,
.file-label svg,
.ai-enhance-button svg {
    width: 20px;
    height: 20px;
}

.emoji-picker-button,
.file-label,
.ai-enhance-button {
    transition: transform 0.2s ease;
}

.emoji-picker-button:hover,
.file-label:hover,
.ai-enhance-button:hover {
    transform: scale(1.2);
}

.emoji-picker-button svg:hover,
.file-label svg:hover,
.ai-enhance-button svg:hover {
    fill: #0968fe;
}

.ai-enhance-group {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
}

.tone-selector {
    width: 24px;
    height: 30px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: transparent;
    cursor: pointer;
    transition: all 0.2s;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="16" width="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 6l5 5 5-5 2 1-7 7-7-7z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    appearance: none;
    -webkit-appearance: none;
    margin-left: 3px;
    margin-right: 10px;
    margin-top: 4px;
}

.tone-selector:hover,
.tone-selector:focus {
    border-color: #0968fe;
    width: auto;
    padding: 0 24px 0 8px;
    color: #333;
    background-position: right 4px center;
}

.tone-selector:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.ai-enhance-button {
    margin-right: -2px;
}

.file-input {
    display: none;
}

.ai-enhance-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-actions .button {
    margin-left: 180px;
}

/* Loading Spinner */
.form-actions .loading-spinner {
    display: none;
    position: absolute;
    left: 40%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    z-index: 1000;
}

.emoji-option {
    background: none;
    border: none;
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.emoji-option:hover {
    background-color: #f0f0f0;
}

/* File Preview */
.file-preview {
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 200px;
    margin-top: 10px;
}

.image-preview img {
    max-height: 200px;
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.remove-image:hover {
    background: #c82333;
}

.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* AI Text Review Modal */
.ai-review-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.ai-review-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 70%;
    max-width: 800px;
}

.text-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.text-column {
    background: #fbfbfb;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.text-column h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.text-content {
    white-space: pre-wrap;
    word-break: break-word;
    color: #444;
    line-height: 1.5;
}

.review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Fix form actions layout */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    position: relative;
    padding-top: 10px;
}

.form-actions .button-primary {
    padding: 10px 40px 10px 40px;
}

.form-actions .button.cancel-contact {
    padding: 10px 20px 10px 20px!important;
    margin-left: 0;
}

.delete-conversation {
    width: 100%;
    color: #dc3545!important;
    border-color: #dc3545!important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.delete-conversation .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.delete-conversation:hover {
    background: #dc3545 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

.delete-conversation:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Pagination */
.conversations-pagination {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    line-height: 2.5;
}

.conversations-pagination a,
.conversations-pagination span {
    display: inline-block;
    padding: 3px 8px;
    margin: 0 3px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    text-decoration: none;
    color: #666;
}

.conversations-pagination span.current {
    background: #0968fe;
    border-color: #0073aa;
    color: #fff;
}

.conversations-pagination a:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Error message */
.conversation-item .error-message {
    padding: 0px;
    color: #dc3545;
}

/* No conversations message */
.no-conversations {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}
