/* developed by web-premium.ir */
button#hmyt-ai-save-fake-reviews-btnوbutton#hmyt-ai-keyword-btn,#hmyt-bulk-toggle-btn,button#hmyt-ai-generate-fake-reviews-btn,button#hmyt-ai-delete-description-summary,button#hmyt-ai-delete-post-content-summary,button#hmyt-ai-delete-post-review-summary,button#hmyt-ai-delete-review-summary,button#hmyt-ai-summarize-description-btn,button#hmyt-ai-summarize-description-btn-initial,button#hmyt-ai-summarize-post-content-btn,button#hmyt-ai-summarize-post-content-btn-initial,button#hmyt-ai-summarize-post-reviews-btn,button#hmyt-ai-summarize-post-reviews-btn-initial,button#hmyt-ai-summarize-reviews-btn,button#hmyt-ai-summarize-reviews-btn-initial{background-color:#1C274C;color:#fff;padding:6px 16px;border:none;border-radius:5px;cursor:pointer;font-size:14px;display:flex;gap:5px;align-content:center;flex-direction:row;align-items:center;justify-content:center}.hmyt-ai-no-description-summary,.hmyt-ai-no-review-summary{display:flex;flex-direction:column;align-items:center;align-content:center;justify-content:center}button#hmyt-ai-delete-description-summary:hover,button#hmyt-ai-delete-post-content-summary:hover,button#hmyt-ai-delete-post-review-summary:hover,button#hmyt-ai-delete-review-summary:hover,button#hmyt-ai-summarize-description-btn-initial:hover,button#hmyt-ai-summarize-description-btn:hover,button#hmyt-ai-summarize-post-content-btn-initial:hover,button#hmyt-ai-summarize-post-reviews-btn-initial:hover,button#hmyt-ai-summarize-post-reviews-btn:hover,button#hmyt-ai-summarize-reviews-btn-initial:hover button#hmyt-ai-summarize-post-content-btn:hover,button#hmyt-ai-summarize-reviews-btn:hover{background-color:#121a27ba}.hmyt-ai-description-actions,.hmyt-ai-reviews-actions{display:flex;flex-direction:row;align-content:center;align-items:center;gap:8px;justify-content:flex-start;flex-wrap:wrap}.hmyt-ai-satisfaction-container{display:flex;flex-direction:row;align-content:center;align-items:center;gap:5px;margin:15px 0}.hmyt-ai-meta-box .nav-tab-wrapper{margin-bottom:15px}.hmyt-ai-meta-box .tab-content,.hmyt-ai-review-summary.hidden{display:none}.hmyt-ai-meta-box .tab-content.active{display:block}.hmyt-ai-editor-container textarea{width:100%;min-height:150px}.hmyt-ai-satisfaction-icons label{display:inline-block;margin-right:15px}.hmyt-ai-satisfaction-icons span{vertical-align:middle;margin-left:5px}.icon-happy{color:#4caf50}.icon-neutral{color:#ffc107}.icon-sad{color:#f44336}.hmyt-ai-pros-cons-container textarea{width:100%;min-height:80px}#ai-comment-description,#ai-comment-reviews{margin:30px 0;border-radius:8px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.05)}.satisfaction-container,.summary-header{display:flex;align-items:center;padding:15px 20px;border-bottom:1px solid #e6e7f4}.summary-icon{width:40px;height:40px;flex-shrink:0}.header-text{margin-right:15px}.header-text h3{margin:0;font-size:18px;color:#212529}.satisfaction-icon{width:32px;height:32px;margin-left:10px;flex-shrink:0}.satisfaction-text{display:flex;flex-direction:row;gap:5px}.satisfaction-text .percentage{font-size:18px;font-weight:700;color:#212529}.satisfaction-text .label{font-size:13px;color:#6c757d}.summary-content-container{position:relative;padding:20px;}.tail-icon{position:absolute;top:-16px;right:30px;width:22px;height:16px}.hmyt-ai-skeleton,.summary-content{position:relative}.summary-text{font-size:15px;font-weight:500;line-height:1.7;color:#495057;margin-bottom:20px;overflow:hidden;max-height:0;transition:max-height .6s ease-out} div.summary-text  p { font-size: 15px !important; line-height: 1.8 !important; } .disclaimer,.feedback-container,.pros-cons-container{display:none;opacity:0;transform:translateY(15px);transition:opacity .4s ease-out,transform .4s ease-out}.pros-cons-container.visible{display:flex;flex-direction:column;opacity:1;transform:translateY(0)}.disclaimer.visible{display:block;opacity:1;transform:translateY(0)}.feedback-container.visible{display:flex;opacity:1;transform:translateY(0)}.pros-cons-container{gap:15px;margin-bottom:15px}.cons-list,.pros-list{flex:1;display:flex;flex-wrap:wrap;gap:8px}.con-item,.pro-item{display:none;opacity:0;transform:translateY(10px);align-items:center;padding:5px 10px;border-radius:20px;font-size:13px;transition:opacity .3s ease-out,transform .3s ease-out}.con-item.visible,.pro-item.visible{display:inline-flex;opacity:1;transform:translateY(0)}.pro-item{background:rgba(40,167,69,.1);color:#3dbf5e}.con-item{background:rgba(220,53,69,.1);color:#ff4f5d}.con-item svg,.pro-item svg{margin-left:5px}.disclaimer{font-size:13px;color:#6c757d;text-align:left;margin-top:15px}.feedback-container{border-radius: 0 0 15px 15px; align-items:center;justify-content:space-between;padding:15px 20px;border-top:1px solid #e6e7f4}.feedback-question{font-size:15px;color:#212529}.feedback-buttons,.hmyt-ai-skeleton-feedback-buttons{display:flex;gap:10px}.feedback-btn{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:0 0;border:1px solid #e6e7f4;cursor:pointer;transition:.2s}.stat-box.negative,.stat-box.percentage,.stat-box.positive,.stat-box.total{padding:4px 8px;border-radius:8px;color:#fff;font-weight:500}.summary-footer{padding:10px 20px;font-size:13px;color:#6c757d;text-align:left;background:#f8f9fa;border-top:1px solid #e6e7f4}.ai-title-cmnt{font-size:18px;font-weight:700}.feedback-stats{display:flex;gap:6px;flex-direction:row;justify-content:flex-start;align-items:center}.stat-box.positive{background:#49cd72}.stat-box.negative{background:#ff4f5d}.stat-box.total{background:#1f9dd2}.stat-box.percentage{background:#3b3b3b}.hmyt-ai-skeleton-wrapper{position:relative;overflow:hidden}.hmyt-ai-skeleton{background:linear-gradient(90deg,#e2e8f0 25%,#d1d9e6 50%,#e2e8f0 75%);background-size:200% 100%;animation:1.2s ease-in-out infinite ai-skeleton-loading;box-shadow:0 2px 8px rgba(0,0,0,.08);border-radius:10px;overflow:hidden}.hmyt-ai-skeleton::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,.2);animation:2s ease-in-out infinite pulse}@keyframes ai-skeleton-loading{0%{background-position:200% 0}100%{background-position:-200% 0}}@keyframes pulse{0%,100%{opacity:0}50%{opacity:.3}}.hmyt-ai-skeleton-header{display:flex;align-items:center;gap:12px;margin-bottom:24px}.hmyt-ai-skeleton-lottie{width:60px;height:60px;border-radius:12px}.hmyt-ai-skeleton-header-container{display:flex;flex-direction:column;gap:10px!important}.hmyt-ai-skeleton-title{width:200px;height:24px;border-radius:8px}.hmyt-ai-skeleton-footer,.hmyt-ai-skeleton-subtitle{width:150px;height:18px;border-radius:8px}.hmyt-ai-skeleton-satisfaction{display:flex;align-items:center;gap:12px;margin-bottom:20px}.hmyt-ai-skeleton-satisfaction-icon{width:40px;height:40px;border-radius:50%}.hmyt-ai-skeleton-satisfaction-text{width:120px;height:24px;border-radius:8px}.hmyt-ai-skeleton-content{width:100%;height:100px;border-radius:12px;margin-bottom:12px}.hmyt-ai-skeleton-pros-cons{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.hmyt-ai-skeleton-pros-cons-item{display:flex;align-items:center;gap:8px}.hmyt-ai-skeleton-pros-cons-icon{width:20px;height:20px;border-radius:4px}.hmyt-ai-skeleton-pros-cons-text{width:80%;height:20px;border-radius:8px}.hmyt-ai-skeleton-disclaimer{width:60%;height:18px;border-radius:8px;margin-bottom:12px}.hmyt-ai-skeleton-feedback{display:flex;gap:12px;flex-direction:row;align-items:center;align-content:center;justify-content:space-between}.hmyt-ai-skeleton-feedback-question{width:50%;height:20px;border-radius:8px}.hmyt-ai-skeleton-feedback-button{width:40px;height:40px;border-radius:8px}.hmyt-ai-review-summary{opacity:0;transition:opacity .3s ease-in-out}.hmyt-ai-review-summary.visible{opacity:1}button.button.button-primary.hmyt-ai-generate-comment-response-btn{border-radius:7px!important;padding:1px 10px!important}strong.ai-generated{padding:0 4px;border-radius:4px;background:#fff077;font-size:12px!important;font-weight:500;color:#021959!important}.aff-title span{color:#2a3545}
.feedback-btn.like-btn.active svg {
    fill: #49dc4f;
    color: #f0fff0;
}
.feedback-btn.like-btn.active {
    color: #49dc4f;
    border: 1px solid;
    background: #f0fff0;
}
.feedback-btn.dislike-btn.active {
    color: #ff4f5d;
    border: 1px solid;
    background: #fff0f1;
}
.feedback-btn.dislike-btn.active svg {
    fill: #ff4f5d;
    color: #fff0f1;
}
.feedback-btn:hover {
    background: #f9f9f9;
    color: #47586b;
    border-color: #54667a54;
}

.summary-header {border-radius: 15px 15px 0 0;}
h3.ai-title-cmnt {
    margin: 5px !important;
}

h3.ai-title-cmnt {
    line-height: normal;
    padding: 0;
}

.header-text {
    line-height: normal;
}

.hmyt-ai-review-summary.visible {
    line-height: normal;
    border: 1px solid #e6e7f4;
    border-radius: 15px;
    background: #f5f6ff;
}

/* Batch Processing Styles - Container Layout */
/* استایل مودال جزئیات پردازش گروهی */
.hmyt-admin-modal {
    display: none; 
    position: fixed; 
    z-index: 100000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(2px);
}

.hmyt-admin-modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 700px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: hmyt-modal-slide-down 0.3s ease-out;
}

.hmyt-admin-modal-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    left: 20px; /* در حالت راست‌چین، دکمه بستن سمت چپ قرار می‌گیرد */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.hmyt-admin-modal-close:hover,
.hmyt-admin-modal-close:focus {
    color: #ff4f5d;
    text-decoration: none;
}

.hmyt-admin-modal-content h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #1C274C;
}

@keyframes hmyt-modal-slide-down {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.hmyt-batch-status-wrapper #hmyt-batch-jobs-container { display: flex; flex-direction: column; gap: 15px; }
.hmyt-batch-job-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 10px 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    flex-direction: row;
    justify-content: space-between;
}
.job-info {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}
.job-info strong { font-size: 14px; color: #1e293b; }
.job-info small { font-size: 12px; color: #64748b; }
.job-info .hmyt-status-badge { margin-top: 5px; align-self: flex-start; }
.job-progress { grid-column: 2 / 4; grid-row: 1 / 2; }
.job-stats {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #475569;
    align-items: center;
}
.job-actions { grid-column: 2 / 4; grid-row: 2 / 3; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.hmyt-progress-bar.status-queued { background-color: #64748b; }
.hmyt-progress-bar.status-running { background-color: #3b82f6; }
.hmyt-progress-bar.status-completed { background-color: #22c55e; }
.hmyt-progress-bar.status-stopped { background-color: #ef4444; }
.hmyt-status-badge.status-در-انتظار { background-color: #94a3b8; }
.hmyt-batch-status-wrapper {
    gap: 10px;
    display: flex;
    flex-direction: column;
}
.hmyt-cron-info-box {
    background: #f0f6fc;
    border: 1px solid #7cb5ec;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    justify-content: center;
    align-content: flex-start;
}
.hmyt-cron-info-box h4 { margin-top: 0; color: #0a4b84; display: flex; align-items: center; gap: 8px; }
.hmyt-cron-info-box .hmyt-code-block { background: #e2e8f0; padding: 10px; border-radius: 6px; display: flex; align-items: center; gap: 10px; }
.hmyt-cron-info-box textarea { width: 100%; background: transparent; border: none; font-family: monospace; color: #1e293b; resize: none; }
#hmyt-item-count-info { min-height: 20px; }


    .hmyt-avatar-picker { display: flex; gap: 10px; align-items: center; }
    .hmyt-avatar-preview { margin-top: 10px; }





/* assets/css/hmyt-ai-chat-logs.css - Rewritten for a minimal, responsive design */
:root {
    --chat-bg: #f7f8fc;
    --sidebar-bg: #ffffff;
    --border-color: #e5e7eb;
    --header-bg: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --accent-color: #43d343;
    --accent-color-light: #43d34314;
    --danger-color: #ef4444;
    --danger-hover-color: #dc2626;
}

.hmyt-chat-logs-page #wpcontent {
    padding-left: 0;
}

#hmyt-chat-logs-wrapper {
    display: flex;
    flex-direction: row-reverse;
    height: calc(100vh - 120px);
    background-color: var(--chat-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

/* Sidebars General */
.sidebar-hmyt-right, .sidebar-hmyt-left {
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.sidebar-hmyt-right {
    flex: 0 0 300px;
    order: 3;
    flex-shrink: 0;
    border-left: 1px solid var(--border-color);
}

.sidebar-hmyt-left {
    /* Set initial state to be completely collapsed */
    flex-basis: 0;
    flex-shrink: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden; /* Prevent content from showing during transition */
    border-right: none; /* Hide border when collapsed */
    
    /* Define smooth transition for multiple properties */
    transition: flex-basis 0.4s ease, max-width 0.4s ease, opacity 0.3s ease;
    
    /* Keep other properties */
    order: 1;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
}

.sidebar-hmyt-left.is-visible {
    /* Expand to full width */
    flex-basis: 280px;
    max-width: 280px;
    opacity: 1;
    border-right: 1px solid var(--border-color); /* Show border when visible */
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--header-bg);
    flex-shrink: 0;
}
.sidebar-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.sidebar-content {
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
}
.sidebar-content .spinner-wrapper {
    text-align: center;
    padding: 40px 0;
}

/* Right Sidebar - Sessions List */
/* Refresh Button Styles */
.sidebar-header-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

button#hmyt-refresh-sessions-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: auto; /* برای هل دادن دکمه به سمت چپ */
}

button#hmyt-refresh-sessions-btn:hover {
    background-color: #f3f4f6;
    color: #1C274C;
    border-color: #d1d5db;
}

button#hmyt-refresh-sessions-btn svg {
    width: 18px;
    height: 18px;
}

/* Animation */
@keyframes hmyt-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

button#hmyt-refresh-sessions-btn.spinning svg {
    animation: hmyt-spin 1s linear infinite;
    color: #3b82f6; /* رنگ آبی هنگام چرخش */
}

.sidebar-header .search-box-wrapper {
    margin-top: 1rem;
}
#hmyt-chat-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#hmyt-chat-search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color-light);
    outline: none;
}

div#sessions-container {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#sessions-container .session-item {
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #f1f1f1;
    box-shadow: 0 5px 15px rgb(0 0 0 / 7%);
}

#sessions-container .session-item:hover {
    background-color: var(--header-bg);
}
#sessions-container .session-item.active {
    background-color: #fff7f7;
    border: #ff4d4f3b 1px solid;
}
#details-container a {
    color: #2e97e2;
    font-weight: 600;
}
#sessions-container .session-item.active::after {
    content: '';
    position: absolute;
    right: 0; /* در سمت راست قرار بگیرد */
    top: 50%;
    transform: translateY(-50%);
    width: 4px; /* ضخامت بوردر */
    height: 40%; /* ارتفاع بوردر (مثلا ۶۰٪ ارتفاع آیتم) */
    background-color: #ff4d4f;
    border-radius: 7px; /* گوشه‌های گرد */
}
.session-item .session-ip {
    font-weight: 600;
    color: var(--text-primary);
}
.session-item .session-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}
/* Admin Chat Feedback Icons */
.message-footer .feedback-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    padding: 2px;
}
.message-footer .feedback-icon.like {
    color: #49cd72;
}
.message-footer .feedback-icon.dislike {
    color: #ff4f5d;
}
/* Center Column - Conversation */
#hmyt-chat-conversation {
    flex-grow: 1;
    order: 2;
    display: flex;
    min-width: 0;
    flex-direction: column;
}
.conversation-container {
    flex-grow: 1;
    background-image: repeating-linear-gradient(45deg,#fafafa,#fafafa 30px,#fff 0,#fff 60px);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.select-chat-prompt, .no-selection {
    text-align: center;
    margin: auto;
    color: #888;
}

/* --- Start: Chat Bubble Styles (Unchanged as requested) --- */
.message-wrapper {
    display: flex;
    flex-direction: column;
}
.message-wrapper.user {
    align-items: flex-start; /* RTL: user on the left */
}
.message-wrapper.model {
    align-items: flex-end; /* RTL: bot on the right */
}
.message {
    max-width: 85%;
    width: fit-content;
    word-wrap: break-word;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.message.user {
    background: #1f2029;
    color: #d8d9e0;
}
.message.model {
    background: #CFD8DC;
    color: #333;
}
.message p { margin: 0 0 10px; }
.message p:last-child { margin-bottom: 0; }
.message ul, .message ol { padding-right: 20px; margin: 10px 0; }
.message a { color: #ff4f5d; font-weight: bold; }
.message code {
    background-color: rgba(0,0,0,0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
}
.message pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}
.message pre code { background: none; padding: 0; }
.message-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #888;
    margin-top: 8px;
}
.message-wrapper.user .message-footer { flex-direction: row; }
.message-wrapper.model .message-footer { flex-direction: row-reverse; }
.message-footer .timestamp { color: #999; font-size: 10px; }
/* --- End: Chat Bubble Styles --- */

/* Left Sidebar - Details */
#details-container ul {
    list-style: none;
    margin: 0;
    padding: 1.25rem;
}
#details-container li {
    padding: 0.75rem 0;
    display: flex;
    gap: 5px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    justify-content: space-between;
}
#details-container li:last-child { border-bottom: none; }
#details-container li strong {
    display: flex;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
    gap: 5px;
    vertical-align: middle;
    text-align: right;
    flex-direction: row;
    align-items: center;
}
#details-container li strong > svg {
    width: 20px;
    height: 20px;
}
#details-container li span, #details-container li {
    color: var(--text-secondary);
    word-wrap: break-word;
}
#details-container a:hover {
    color: #2884c5;
}
.details-actions {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--header-bg);
    text-align: left;
}
.button.button-link-delete { color: var(--danger-color); }
.button.button-link-delete:hover { color: var(--danger-hover-color); }

/* Buttons & Header */
.wp-heading-inline {
    margin-bottom: 10px;
}
.button-danger {
    color: var(--danger-color) !important;
    background-color: #fff !important;
    border-color: var(--danger-color) !important;
}
.button-danger:hover, .button-danger:focus {
    background-color: var(--danger-hover-color);
    border-color: var(--danger-hover-color);
    color: #fff;
}

/* Responsive Styles for Mobile */
@media (max-width: 960px) {
    #hmyt-chat-logs-wrapper {
        flex-direction: column;
        height: auto; /* Allow content to flow naturally */
        max-height: none;
    }

    /* Display all sidebars and set their order */
    .sidebar-hmyt-right, .sidebar-hmyt-left {
        flex-basis: auto; /* Reset fixed width */
        border-left: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-hmyt-right {
        order: 2; /* List of chats on top */
    }

    .sidebar-hmyt-left {
        order: 3; /* User details in the middle */
        /* Reset animation properties and hide by default */
        flex-basis: auto;
        max-width: none;
        opacity: 1;
        overflow: visible;
        display: none; 
    }

    .sidebar-hmyt-left.is-visible {
        display: flex; /* Simply show it when active on mobile */
        width: 100%;
        max-width: 100%;
    }

    #hmyt-chat-conversation {
        order: 3; /* Conversation at the bottom */
        height: auto; /* Remove fixed height to prevent double scrollbars */
        min-height: 300px;
        max-height: 45vh;
    }
    
    .sidebar-content {
        /* On mobile, prevent sidebars from becoming too tall */
        max-height: 30vh;
    }
}

@media (max-width: 600px) {
    #hmyt-chat-logs-wrapper {
        margin-top: 10px;
    }
    .wrap h1, .wrap .page-title-action {
        font-size: 18px;
    }
}

button#hmyt-delete-single-chat-btn, button#hmyt-delete-all-chats-btn {
    border-color: #ff4d4f;
    background: #ffffff;
    color: #ff4d4f;
    border: 1px solid #ff4d4f;
    display: flex;
    padding: 3px 10px;
    gap: 5px;
    border-radius: 8px;
    font-weight: 600;
    align-items: center;
    cursor: pointer;
}

/* --- Custom Scrollbar Styles for Sidebars --- */
.sidebar-content {
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #d1d5db var(--sidebar-bg); /* For Firefox */
}

.sidebar-content::-webkit-scrollbar {
    width: 6px; /* Width of the scrollbar */
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent; /* Make the track invisible */
}

.sidebar-content::-webkit-scrollbar-thumb {
    background-color: #d1d5db; /* Light grey color for the thumb */
    border-radius: 10px; /* Rounded corners */
    border: 2px solid var(--sidebar-bg); /* Creates a padding effect */
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1aa; /* Darker color on hover */
}


/* --- Custom Scrollbar for Main Conversation Area --- */
.conversation-container {
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #d1d5db var(--chat-bg); /* For Firefox */
}

.conversation-container::-webkit-scrollbar {
    width: 6px;
}

.conversation-container::-webkit-scrollbar-track {
    background: transparent;
}

.conversation-container::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 10px;
    border: 2px solid var(--chat-bg); /* Use chat background for padding effect */
}

.conversation-container::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1aa;
}


p.select-chat-prompt-first {
    padding: 5px 10px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
}

div#details-container {
    display: flex;
    flex-direction: column;
}

span#sessions-count {
    background: #faad14;
    color: #fff;
    line-height: normal;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    padding: 1px 7px;
    margin: 0 5px;
    border-radius: 5px;
}

.sidebar-header-count {
    display: flex;
}







/* --- Product Recommendation Styles (Revised for Overflow) --- */
.hmyt-product-recommendations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    align-self: flex-end;
    width: 100%;
    max-width: 85%; /* Same as the message bubble */
}

.hmyt-product-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background-color: #f0f2f5;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s;
    overflow: hidden; /* Prevent any potential overflow from the card itself */
}

.hmyt-product-card:hover {
    background-color: #e9ebed;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.hmyt-product-card-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.hmyt-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px !important;
}

/* === FIX IS HERE === */
.hmyt-product-card-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden; /* Crucial for containing the children */
    min-width: 0;     /* The key fix for flexbox shrinking */
}

.hmyt-product-card-title {
    font-weight: 600;
    color: #1f2029;
    font-size: 14px;
    white-space: nowrap;      /* Prevents text from wrapping */
    overflow: hidden;         /* Hides the overflowing text */
    text-overflow: ellipsis;  /* Adds the "..." */
}

.hmyt-product-card-price {
    font-size: 13px;
    color: #ff4d4f;
}

.hmyt-product-card-price ins {
    text-decoration: none;
    font-weight: bold;
}

.hmyt-product-card-price del {
    opacity: 0.6;
    margin-left: 5px;
}

.hmyt-product-recommendations-loading {
    align-self: flex-end;
    width: 100%;
    max-width: 90%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

/* --- NEW: Truncate long link in admin user details (RTL Fix) --- */
#hmyt-chat-user-details ul li a {
    display: inline-block;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    direction: ltr;      /* This is the key fix */
    text-align: right;   /* This keeps the visual alignment correct */
}

.hmyt-chat-stats-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 25px;
        padding: 5px; /* Add a little padding for the glow effect */
    }
    .stat-box {
        /* Glassmorphism Effect */
        background: rgba(255, 255, 255, 0.4);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);

        /* Modern Look */
        padding: 25px 20px;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        transition: box-shadow 0.3s ease;
    }
    .stat-box:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    }
    .stat-box h4 {
        margin: 0 0 12px;
        font-size: 15px;
        font-weight: 600;
        color: #4a5568; /* A softer black */
    }
    .stat-box .stat-value {
        font-size: 2.7em;
        font-weight: 700;
        color: #1C274C; /* Darker for better contrast */
        line-height: 1.1;
    }
    .stat-box .stat-value.green { color: #2f855a; }
    .stat-box .stat-value.red { color: #c53030; }
    .stat-box .stat-description {
        margin-top: 8px;
        font-size: 12px;
        color: #718096; /* A lighter gray */
    }

    .satisfaction-text {
        display: flex;
        flex-direction: row;
        gap: 5px;
        align-items: center;
    }

    .summary-text p {
        text-align: right !important;
    }

    .message > ul {
        list-style: revert;
    }



    /* Smart Reviews Styles */
.hmyt-ai-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}
.hmyt-ai-col {
    flex: 1;
    min-width: 150px;
}
.hmyt-ai-col label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3338;
}
.hmyt-ai-col select, .hmyt-ai-col input {
    width: 100%;
    max-width: 100%;
}
.hmyt-review-item {
    transition: all 0.3s ease;
    border-right: 4px solid #1C274C !important;
}
.hmyt-review-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.fr-delete:hover {
    background: #fee !important;
}










/* --- استایل‌های منتقل شده برای پاسخ‌دهی گروهی --- */
/* Utility Classes needed for admin modal */
.flex { display: flex; }
.flex-c { flex-direction: column; }
.flex-r { flex-direction: row; }
.flex-icenter { align-items: center; }

/* استایل دکمه تریگر تولبار */
.hmyt-bulk-toolbar-simple { margin-bottom: 20px; display: flex; justify-content: flex-end; }
.hmyt-bulk-trigger-btn { background: #fff; color: #54667a; border: 1px solid #ccd0d4; padding: 8px 15px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.hmyt-bulk-trigger-btn:hover { border-color: #54667a; background: #f6f7f7; }

/* استایل‌های داخل مودال */
.hmyt-bulk-notices ul { list-style: disc; padding-right: 20px; margin: 0; font-size: 13px; color: #646970; background: #f0f6fc; border: 1px solid #cce5ff; border-radius: 8px; padding: 15px 25px 15px 10px; }
.hmyt-bulk-notices li { margin-bottom: 5px; }
.hmyt-bulk-notices li:last-child { margin-bottom: 0; }

/* دکمه اصلی شروع */
.hmyt-bulk-action-btn { background: #1C274C; color: #fff; border: none; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; position: relative; transition: all 0.3s ease; }
.hmyt-bulk-action-btn.state-processing { background: #e2e4e7 !important; color: #54667a !important; cursor: wait; }
.hmyt-bulk-action-btn.state-found { background: #3b82f6 !important; color: #fff !important; }
.hmyt-bulk-action-btn.state-running { background: #ff4f5d !important; color: #fff !important; }
.hmyt-bulk-action-btn.state-done { background: #49dc4f !important; color: #fff !important; }

/* استایل مودال ادمین */
.product-ai-modal-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #000; z-index: 99998; opacity: .5; }
.product-ai-modal-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99999; display: flex; justify-content: center; align-items: center; }
.product-ai-modal-wrapper { background: #fff; width: 90%; max-width: 500px !important; border-radius: 15px; box-shadow: 0 9px 19px rgba(0,0,0,0.161); position: relative; }
.product-ai-modal-head { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.product-ai-modal-head-title { font-size: 16px; font-weight: 700; }
.product-ai-modal-close { cursor: pointer; opacity: 0.6; }
.product-ai-modal-close:hover { opacity: 1; }
.product-ai-modal-close svg { width: 24px; height: 24px; }
.product-ai-modal-hmyt-comment-wrapper { padding: 20px; }


/* وضعیت و انیمیشن */
.hmyt-bulk-status-container { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; width: 100%; }
.hmyt-status-col { display: flex; align-items: center; gap: 15px; flex-direction: row-reverse; }
.hmyt-status-text { font-size: 13px; font-weight: 600; color: #54667a; }
.hmyt-log-col { flex: 1; display: flex; justify-content: flex-start; overflow: hidden; }
.comment-reply-btn.ai-reply-btn { position: relative; background: none; border: none; padding: 5px; cursor: default; display: flex; align-items: center; color: #54667a; }
.comment-reply-btn.ai-reply-btn.loading::after { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border-radius: 50%; border: 2px solid transparent; border-top-color: #ff4f5d; border-right-color: #ff4f5d; animation: ai-spin 0.8s linear infinite; pointer-events: none; }
.comment-reply-btn.ai-reply-btn.loading svg { opacity: 0.8; animation: ai-pulse 1.2s infinite ease-in-out; width: 20px; height: 20px; }

@keyframes ai-pulse { 0% { transform: scale(0.85); } 50% { transform: scale(1.15); } 100% { transform: scale(0.85); } }
@keyframes ai-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hmyt-log-col > span.comment-reply-btn.ai-done.flex { display: inline-flex; align-items: center; color: #49dc4f !important; gap: 5px; border: 1px solid #49dc4f !important; padding: 4px 10px !important; border-radius: 10px; font-weight: 600; font-size: 12px; justify-content: center; background: #f0fff0; white-space: nowrap; opacity: 0; transform: translateX(20px); animation: ai-slide-in-right 0.4s cubic-bezier(.2,.9,.2,1) forwards; }
.hmyt-log-col > span.comment-reply-btn.ai-done.flex svg { height: 15px; width: 15px; background: #49dc4f; color: #fff; border-radius: 50%; padding: 2px; flex-shrink: 0; }
@keyframes ai-slide-in-right { to { opacity: 1; transform: translateX(0); } }

.product-ai-modal-close svg {
    background: #e1e1e1;
    border-radius: 50px;
    padding: 5px;
}
.product-ai-modal-close {
    display: flex;
    padding: 3px 3px;
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.2s ease
}

.product-ai-modal-close:hover {
    opacity: 0.8
}

.product-ai-modal-close svg {
    width: 20px;
    height: 20px
}

button#hmyt-bulk-toggle-btn svg {
    width: 20px;
    height: 20px;
}


label.checkbox-ai {
    padding-right: 5px;
    display: flex;
    align-items: center;
}

.hmyt-bulk-options {
    margin: 15px  0;
}

.hmyt-avatar-picker-wrapper {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.hmyt-ai-actions-footer {
    display: flex;
    align-items: center;
}

.hmyt-publish {
    display: flex !important;
    align-items: center;
    color: #49dc4f !important;
    gap: 5px;
    border: 1px solid #49dc4f !important;
    padding: 6px 16px !important;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 700;
    justify-content: center;
    cursor: pointer;
    background: #f0fff0;
}


.hmyt-publish svg {
    height: 15px;
    width: 15px;
    background: #49dc4f;
    color: #fff;
    border-radius: 50%;
    padding: 2px;
    flex-shrink: 0;
}

.hmyt-flex {
    display: flex;
}

@media (max-width: 600px) {
    .hmyt-platform-text-var-item {
        display: flex;
        flex-direction: column;
    }
}



.hmyt-guard-connection-box {
    margin: 25px 0;
    padding: 0px 0 0px 15px;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    flex-direction: column;
}

.hmyt-guard-connection-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: #ebefff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c274c;
    z-index: 1;
    box-shadow: inset 0 0 10px rgb(34 41 255 / 10%);
}

.hmyt-guard-connection-content {
    z-index: 1;
    flex-grow: 1;
}

.hmyt-guard-connection-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hmyt-guard-connection-title {
    font-size: 18px;
    font-weight: 800;
    color: #1d2327;
    margin: 0;
    line-height: 1.2;
}

.hmyt-guard-connection-badge {
    background: linear-gradient(45deg, #1c274c, #41528a);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgb(111 114 220 / 30%);
}

.hmyt-guard-connection-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #50575e;
    margin: 0 0 15px 0;
    text-align: justify;
}

.hmyt-guard-connection-tips {
    background: rgb(255 255 255 / 70%);
    border: 1px dashed #bcbeff;
    border-radius: 8px;
    padding: 12px 18px;
}

.hmyt-guard-connection-tips-title {
    font-weight: 700;
    color: #1c274c;
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hmyt-guard-connection-tips ul {
    margin: 0;
    padding-right: 20px; /* راست‌چین */
    list-style-type: disc;
}

.hmyt-guard-connection-tips li {
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}
.hmyt-guard-connection-tips li strong {
    color: #333;
}
.hmyt-guard-connection-tips li:last-child {
    margin-bottom: 0;
}