/* ===========================
   Matching System – Modal View (Final Fix)
   =========================== */

/* רקע */
.msp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
}

.msp-modal-overlay.msp-modal-open {
    display: flex !important;
}

/* המודאל */
.msp-modal {
    background: #fff;
    width: 95%;
    max-width: 650px;
    max-height: 85vh;
    padding: 25px;
    border-radius: 15px;
    position: relative;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: right;
    direction: rtl; /* מבטיח כיווניות עברית */
}

/* כפתור סגירה */
.msp-modal-close {
    position: absolute;
    left: 15px;
    top: 15px;
    cursor: pointer;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    z-index: 10000;
}

/* HEADER */
.msp-modal-header {
    display: flex;
    flex-direction: row-reverse; /* הופך סדר לתמונה בצד שמאל ושם בימין */
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.msp-modal-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
}

.msp-modal-name {
    font-size: 22px;
    font-weight: bold;
}

/* BODY */
.msp-modal-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 16px;
}

/* ===========================
   אזור הפידבק במודאל - גרסה סופית
   =========================== */

.msp-modal-feedback-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f5f5f5;
    text-align: center;
}

.msp-modal-feedback-container {
    display: flex;
    justify-content: center;
    gap: 15px; /* רווח בין שני הכפתורים */
    margin-top: 15px;
}

/* עיצוב הכפתור */
.msp-modal .msp-feedback-btn {
    all: unset !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    display: inline-flex !important;
    flex-direction: row !important; /* טקסט ואז אייקון */
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    min-width: 150px !important; /* כפתורים רחבים ונוחים */
    font-weight: bold !important;
    font-size: 16px !important;
    color: #ffffff !important;
    transition: 0.2s;
}

/* צבעים */
.msp-modal .msp-feedback-btn.like { background-color: #27ae60 !important; }
.msp-modal .msp-feedback-btn.dislike { background-color: #c0392b !important; }

/* האייקון - מיקום ורווח מהטקסט */
.msp-modal .msp-feedback-btn .dashicons {
    font-family: dashicons !important;
    margin-right: 10px !important; /* יוצר רווח בין הטקסט (מימין) לאייקון (משמאל) */
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 1 !important;
    display: inline-block !important;
}

/* מצבי בחירה */
.msp-modal .msp-feedback-btn:not(.active) {
    opacity: 0.4 !important;
}

.msp-modal .msp-feedback-btn.active {
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

/* התאמה למובייל */
@media (max-width: 600px) {
    .msp-modal .msp-feedback-btn {
        min-width: 130px !important;
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
    .msp-modal .msp-feedback-btn .dashicons {
        margin-right: 6px !important;
        font-size: 18px !important;
    }
}

/* התאמה למובייל - גרסה מתוקנת */
@media (max-width: 600px) {
    .msp-modal { 
        padding: 15px !important; 
        width: 95% !important; 
        max-height: 90vh !important;
    }

    .msp-modal-feedback-container { 
        gap: 8px !important; /* צמצום המרווח בין הכפתורים */
        flex-wrap: nowrap !important; /* מונע מהם לרדת שורה */
    }

    .msp-modal .msp-feedback-btn { 
        min-width: 0 !important; /* מבטל את המינימום שגורם להם לחרוג */
        flex: 1 !important; /* גורם להם להתחלק שווה בשווה ברוחב */
        padding: 8px 5px !important; 
        font-size: 13px !important; /* טקסט קצת יותר קטן למובייל */
        height: 40px !important;
    }

    .msp-modal .msp-feedback-btn .dashicons {
        margin-right: 4px !important;
        font-size: 16px !important;
        width: 16px !important;
        height: 16px !important;
    }

    /* תיקון כדי שהכפתור של הוואטסאפ לא יסתיר את הכפתורים */
    .msp-modal-feedback-section {
        margin-bottom: 20px; 
    }
}