/* ===================================================
   WOPA Interactions Engine (Reactions & Talkbacks)
   Compact, Modern & High-Performance
   =================================================== */

.wopa-interactions-wrap {
    margin: 24px auto 18px auto;
    max-width: 840px;
    direction: rtl;
    text-align: right;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Container Glass Card */
.wopa-interactions-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    padding: 18px 22px;
    overflow: hidden;
}

/* ---------------------------------------------------
   1. Reactions Section (פס רגשות קומפקטי)
   --------------------------------------------------- */
.wopa-reactions-section {
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 18px;
}

.wopa-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wopa-section-title i {
    color: #3b82f6;
    font-size: 1rem;
}

.wopa-reactions-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.wopa-react-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 5px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    outline: none;
}

.wopa-react-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.wopa-react-btn .react-emoji {
    font-size: 1.35rem;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wopa-react-btn:hover .react-emoji {
    transform: scale(1.28);
}

.wopa-react-btn .react-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    min-width: 14px;
    text-align: center;
    transition: all 0.18s;
}

/* User selected reaction */
.wopa-react-btn.active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.18);
}

.wopa-react-btn.active .react-count {
    background: #3b82f6;
    color: #ffffff;
}

/* ---------------------------------------------------
   2. Comments Form (טופס הוספת תגובה הדוק ומעוצב)
   --------------------------------------------------- */
.wopa-comment-form-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.wopa-comment-form-wrap:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.wopa-form-row {
    margin-bottom: 8px;
}

.wopa-input-name {
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.92rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.wopa-input-name:focus {
    border-color: #3b82f6;
}

.wopa-textarea-content {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    resize: vertical;
    min-height: 60px;
    outline: none;
    transition: border-color 0.2s;
}

.wopa-textarea-content:focus {
    border-color: #3b82f6;
}

.wopa-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.wopa-form-tip {
    font-size: 0.78rem;
    color: #64748b;
}

.wopa-btn-submit {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.wopa-btn-submit:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.28);
}

.wopa-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---------------------------------------------------
   3. Comments List (רשימת תגובות)
   --------------------------------------------------- */
.wopa-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wopa-comments-empty {
    text-align: center;
    padding: 22px 14px;
    color: #64748b;
    font-size: 0.92rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}

.wopa-comment-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.18s;
    position: relative;
}

.wopa-comment-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.02);
}

/* Reporter Comment Highlight */
.wopa-comment-item.is-reporter {
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
    border: 1.5px solid #3b82f6;
    box-shadow: 0 3px 14px rgba(59, 130, 246, 0.07);
}

.wopa-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wopa-comment-author-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wopa-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #475569;
    font-size: 1rem;
    flex-shrink: 0;
}

.wopa-comment-item.is-reporter .wopa-comment-avatar {
    border: 2px solid #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.wopa-comment-meta {
    display: flex;
    flex-direction: column;
}

.wopa-comment-author {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wopa-reporter-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.wopa-reporter-title {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 500;
    margin-top: 1px;
}

.wopa-comment-date {
    font-size: 0.78rem;
    color: #94a3b8;
}

.wopa-comment-body {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.55;
    word-break: break-word;
}

/* Toast Message */
#wopa-interaction-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    direction: rtl;
}

#wopa-interaction-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
