/* GlowUp Profile Editor v1.2 */

.gmpe-wrap { direction: rtl; font-family: inherit; }

/* הודעות */
.gmpe-notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-size: 15px; display: none; border: 1px solid transparent; }
.gmpe-pending { background: #fff8e1; border-color: #f9c74f; color: #7a5c00; }
.gmpe-success { background: #e8f8f5; border-color: #6ABFB0; color: #1a6b5e; }
.gmpe-error   { background: #fdecea; border-color: #e57373; color: #b71c1c; }

/* טעינה */
.gmpe-loading { display: flex; align-items: center; gap: 10px; padding: 16px; color: #888; font-size: 14px; }
.gmpe-spinner { width: 22px; height: 22px; border: 3px solid #eee; border-top-color: #6ABFB0; border-radius: 50%; animation: gmpeSpin 0.7s linear infinite; flex-shrink: 0; }
@keyframes gmpeSpin { to { transform: rotate(360deg); } }

/* שלבים — ללא צל, ניתן לשינוי ברקע */
.gmpe-section { margin-bottom: 20px; background: #fff; border-radius: 14px; padding: 20px 24px; box-shadow: none; }
.gmpe-section-title { font-size: 16px; font-weight: 700; color: #6ABFB0; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #f0faf8; }

/* שורת שדות */
.gmpe-fields-row { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.gmpe-field { display: flex; flex-direction: column; gap: 5px; }
.gmpe-w100 { width: 100%; }
.gmpe-w50  { width: calc(50% - 8px); }

/* תווית */
.gmpe-label { font-size: 13px; font-weight: 600; color: #555; }
.gmpe-req { color: #e74c3c; margin-right: 2px; }

/* שדות קלט */
.gmpe-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #d5ccc6;
    border-radius: 8px;
    background: #fdf8f4;
    font-size: 14px;
    color: #333;
    direction: rtl;
    transition: border-color 0.18s, box-shadow 0.18s;
    font-family: inherit;
}
.gmpe-input:focus { border-color: #6ABFB0; box-shadow: 0 0 0 3px rgba(106,191,176,0.15); outline: none; }
textarea.gmpe-input { resize: vertical; min-height: 70px; height: 70px; max-height: 70px; resize: none; }
select.gmpe-input { cursor: pointer; }

/* תמונות */
.gmpe-photo-wrap { display: flex; flex-direction: column; gap: 10px; }

/* תמונות — 2 עמודות עם קו מפריד */
.gmpe-photos-cols {
    display: flex;
    gap: 0;
    align-items: flex-start;
}
.gmpe-photos-col {
    flex: 1;
    padding: 0 20px;
}
.gmpe-photos-col .gmpe-label {
    display: block;
    margin-bottom: 14px;
}
.gmpe-gallery-grid {
    margin-top: 8px;
    margin-bottom: 14px;
}
.gmpe-photo-wrap {
    margin-top: 8px;
}
.gmpe-photos-col-main { padding-right: 0; }
.gmpe-photos-col-gallery { padding-left: 0; }
.gmpe-photos-divider {
    width: 1px;
    background: #e8e0da;
    align-self: stretch;
    flex-shrink: 0;
    margin: 0 4px;
}
.gmpe-photo-box { position: relative; display: inline-block; line-height: 0; }
.gmpe-photo-preview { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; border: 2px solid #e0d5cc; display: block; border-radius: 10px; }
.gmpe-photo-remove {
    position: absolute; top: -8px; left: -8px;
    background: #fff; color: #e74c3c;
    border: 2px solid #e74c3c;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    aspect-ratio: 1 / 1 !important;
    min-width: unset !important; min-height: unset !important;
    max-width: unset !important; max-height: unset !important;
    font-size: 11px; font-weight: 900; cursor: pointer;
    display: grid !important;
    place-items: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.15s, color 0.15s;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    text-align: center !important;
    overflow: hidden;
}
.gmpe-photo-remove:hover { background: #fff; color: #c9a800; border-color: #c9a800; }

/* גלריה */
.gmpe-gallery-grid { display: flex; flex-wrap: wrap; gap: 10px; min-height: 0; }
.gmpe-gallery-item { position: relative; }
.gmpe-gallery-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1.5px solid #e0d5cc; display: block; }
.gmpe-gallery-remove {
    position: absolute; top: -8px; left: -8px;
    background: #fff; color: #e74c3c;
    border: 2px solid #e74c3c;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    aspect-ratio: 1 / 1 !important;
    min-width: unset !important; min-height: unset !important;
    max-width: unset !important; max-height: unset !important;
    font-size: 11px; font-weight: 900; cursor: pointer;
    display: grid !important;
    place-items: center !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: background 0.15s, color 0.15s;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    text-align: center !important;
    overflow: hidden;
}
.gmpe-gallery-remove:hover { background: #fff; color: #e74c3c; border-color: #e74c3c; }

/* כפתור העלאה */
.gmpe-upload-btn {
    padding: 9px 18px;
    border-radius: 8px;
    border: 1.5px dashed #6ABFB0;
    background: #f0faf8;
    color: #6ABFB0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
    margin-top: 10px;
    display: inline-block;
}
.gmpe-upload-btn:hover { background: #6ABFB0; color: #fff; }
.gmpe-gallery-add-btn { display: block; width: 100%; box-sizing: border-box; text-align: center; }

/* כפתורי פעולה */
.gmpe-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: #fff;
    border-radius: 14px;
    margin-top: 10px;
    box-shadow: none;
}
.gmpe-actions-secondary { display: flex; gap: 12px; flex-wrap: wrap; }

.gmpe-save-btn {
    padding: 12px 32px;
    background: #6ABFB0;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 25px !important;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
    font-family: inherit;
}
.gmpe-save-btn:hover { background: #5aafa0; }

.gmpe-suspend-btn-open {
    padding: 11px 22px;
    background: #fff;
    border: 1.5px solid #f9c74f;
    transition: all 0.18s;
    color: #7a5c00;
    border-radius: 25px !important;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}
.gmpe-suspend-btn-open:hover { background: #fff8e1; }

.gmpe-delete-btn-open {
    padding: 11px 22px;
    background: #fff;
    border: 1.5px solid #e57373;
    color: #b71c1c;
    border-radius: 25px !important;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}
.gmpe-delete-btn-open:hover { background: #fdecea; }

/* Modal */
.gmpe-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99999; display: flex; align-items: center; justify-content: center; }
.gmpe-modal { background: #fff; border-radius: 16px; padding: 28px; max-width: 420px; width: 92%; direction: rtl; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.gmpe-modal h3 { margin: 0 0 18px; font-size: 18px; color: #333; font-weight: 700; }
.gmpe-modal p  { color: #666; margin-bottom: 14px; }
.gmpe-reason-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1.5px solid #eee; margin-bottom: 8px; transition: border-color 0.15s; }
.gmpe-reason-item:hover { border-color: #6ABFB0; }
.gmpe-reason-item input { accent-color: #6ABFB0; }
.gmpe-modal-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
.gmpe-suspend-btn { padding: 10px 22px; background: #f9c74f; color: #7a5c00; border: none; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.gmpe-delete-btn  { padding: 10px 22px; background: #e57373; color: #fff; border: 2px solid transparent; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.18s; }
.gmpe-cancel-btn  { padding: 10px 20px; background: #f5f5f5; color: #555; border: none; border-radius: 20px; font-size: 14px; cursor: pointer; font-family: inherit; }

/* Responsive */
@media (max-width: 600px) {
    .gmpe-w50 { width: 100%; }
    .gmpe-section { padding: 16px; }
    .gmpe-actions { flex-direction: column; gap: 14px; }
    .gmpe-actions-secondary { justify-content: center; }
}

.gmpe-upload-btn-auto { display: inline-block; width: auto; }

/* ══ טקסט עזר תמונה ראשית ══ */
.gmpe-photo-hint {
    display: none;
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    text-align: center;
}

/* ══ מסגרת תמונות מובייל/טאבלט ══ */
@media (max-width: 1024px) {
    /* הצג טקסט עזר */
    .gmpe-photo-hint { display: block; }
    /* הסתר X של תמונה ראשית בטאבלט ומובייל */
    .gmpe-photo-remove { display: none !important; }

    /* קונטיינר תמונות — מסגרת אחת מאורכת */
    .gmpe-photos-cols {
        display: block !important;
        border: 1.5px solid #e0d5cc;
        border-radius: 14px;
        overflow: hidden;
        padding: 0;
        gap: 0;
    }
    .gmpe-photos-divider { display: none !important; }
    .gmpe-photos-col {
        padding: 16px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .gmpe-photos-col-main {
        border-bottom: 1.5px solid #e0d5cc;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .gmpe-photos-col-gallery {
        display: block;
    }

    /* תמונה ראשית — ממורכזת */
    .gmpe-photo-wrap { display: flex; flex-direction: column; align-items: center; }
    .gmpe-photo-box { display: inline-block; overflow: visible !important; }

    /* גלריה */
    .gmpe-gallery-grid { justify-content: flex-start; }
}
