/* [صور الأعضاء] محرر الصورة (قص / لف / تكبير) + زرار الكاميرا على صورة العضو */
.gs-ph { position: fixed; inset: 0; z-index: 2050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 12, 16, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: gsPhIn .18s ease; }
@keyframes gsPhIn { from { opacity: 0; } to { opacity: 1; } }
body.gs-ph-open { overflow: hidden; }
.gs-ph-card { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.gs-ph-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #eef0f3; font-size: 15px; color: #1b1d21; }
.gs-ph-head > .fa { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--gs-red-rgb, 213, 60, 65), .1); color: var(--gs-red, #d53c41); }
.gs-ph-head b { flex: 1; font-weight: 800; }
.gs-ph-x { border: 0; background: transparent; font-size: 26px; line-height: 1; color: #8a8f98; cursor: pointer; padding: 0 4px; }
.gs-ph-x:hover { color: #1b1d21; }
.gs-ph-stage { position: relative; margin: 18px 18px 0; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: #f2f3f5; touch-action: none; }
.gs-ph-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.gs-ph-stage canvas:active { cursor: grabbing; }
.gs-ph-grid { position: absolute; inset: 0; pointer-events: none; border-radius: 18px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
    background-image: linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px);
    background-size: 33.333% 33.333%; background-position: -1px -1px; }
.gs-ph-hint { margin: 10px 18px 0; font-size: 12px; color: #8a8f98; text-align: center; }
.gs-ph-tools { display: flex; align-items: center; gap: 10px; padding: 12px 18px 4px; }
.gs-ph-tool { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; border: 1px solid #e3e6ea; background: #fff; color: #3a3f47; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.gs-ph-tool:hover { background: #f5f6f8; border-color: #d2d6dc; }
.gs-ph-z { color: #9aa0a8; font-size: 13px; }
.gs-ph-zoom { flex: 1; min-width: 0; accent-color: var(--gs-red, #d53c41); }
.gs-ph-foot { display: flex; gap: 10px; padding: 14px 18px 18px; }
.gs-ph-foot .btn { flex: 1; height: 42px; border-radius: 12px; font-weight: 800; }
.gs-ph-cancel { background: #f2f3f5; color: #3a3f47; border: 0; }
.gs-ph-save { background: var(--gs-red, #d53c41); color: #fff !important; border: 0; box-shadow: 0 8px 20px rgba(var(--gs-red-rgb, 213, 60, 65), .3); }
.gs-ph-save:disabled { opacity: .6; }

/* زرار الكاميرا جنب صورة العضو (في ملف العضو) */
.gs-mm-av-wrap { position: relative; flex-shrink: 0; display: inline-flex; }
.gs-mm-photo-btn { position: absolute; bottom: -6px; inset-inline-end: -6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #121212; background: #fff; color: #1b1d21; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); transition: transform .15s ease; z-index: 2; }
.gs-mm-photo-btn:hover { transform: scale(1.08); }
.gs-mm-photo-btn.is-busy { pointer-events: none; }
.gs-mm-photo-btn.is-busy .fa:before { content: "\f110"; }
.gs-mm-photo-btn.is-busy .fa { animation: fa-spin 1s infinite linear; }

/* المعاينة الكبيرة: زرار شيل الصورة / تغييرها */
.gs-photo-view .gs-pv-acts { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.gs-photo-view .gs-pv-acts button { height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(20, 20, 20, .75); color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.gs-photo-view .gs-pv-acts button:hover { background: rgba(40, 40, 40, .9); }
.gs-photo-view .gs-pv-acts .is-del .fa { color: #ff8b8f; }

/* خانة الصورة في الفورمز (عضو جديد / تعديل بيانات العضو) */
.gs-photo-field { display: flex; align-items: center; gap: 14px; }
.gs-photo-field .gs-pf-av { width: 64px; height: 64px; border-radius: 18px; flex-shrink: 0; position: relative; overflow: hidden; background: #f2f3f5; color: #9aa0a8; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; border: 1px dashed #d2d6dc; }
.gs-photo-field .gs-pf-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gs-photo-field .gs-pf-av.has-photo { border-style: solid; border-color: transparent; }
.gs-photo-field .gs-pf-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-photo-field .gs-pf-btns button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid #e3e6ea; background: #fff; color: #3a3f47; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.gs-photo-field .gs-pf-btns button:hover { background: #f5f6f8; }
.gs-photo-field .gs-pf-btns .gs-pf-del { color: #c0392b; }
.gs-photo-field small { display: block; color: #8a8f98; font-size: 12px; margin-top: 4px; }
