/* =====================================================================
   theme-auth — صفحتا الدخول والتسجيل (النافذة F، بطلب المالك)
   الهيكل والتخطيط في app.css تاع A؛ هنا: الخلفية، زرّ الإرسال،
   إخفاء أيقونة الرأس، و«لايكات» تطير من الزرّ (السكربت: Seo\AuthFx).
   ===================================================================== */

/* المالك: «نحّي الأيقونة اللي فوق» تاع الدخول/التسجيل */
.auth-logo { display: none; }

/* ── الخلفية: نقش أيقونات تفاعل بلون النصّ (يتبع الثيمات الثلاثة) ── */
.auth-wrap { isolation: isolate; }
.auth-wrap::before {   /* يحلّ محلّ التوهّج الدائري في app.css */
    inset: 0; width: auto; height: auto; border-radius: 0; z-index: -2;
    background: var(--text);
    opacity: .065;
    -webkit-mask: var(--af-tile) 0 0 / 132px 132px repeat;
            mask: var(--af-tile) 0 0 / 132px 132px repeat;
}
:root[data-theme="night"] .auth-wrap::before { opacity: .045; }
.auth-wrap::after {   /* توهّج بلون واحد خلف البطاقة — عمق بلا تدرّج بين لونين */
    content: ''; position: absolute; z-index: -1; pointer-events: none;
    width: min(760px, 130vw); aspect-ratio: 1; border-radius: 50%;
    left: 50%; top: 50%; transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 18%, transparent), transparent);
}
:root {
    --af-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(14 14)'%3E%3Cpath d='M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.4 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10z'/%3E%3C/g%3E%3Cg transform='translate(80 20) rotate(12 12 12)'%3E%3Ccircle cx='9.5' cy='8' r='3.5'/%3E%3Cpath d='M3 20a6.5 6.5 0 0 1 13 0M19 8v6M16 11h6'/%3E%3C/g%3E%3Cg transform='translate(22 82) rotate(-10 12 12)'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3Cg transform='translate(86 86)'%3E%3Cpath d='M13 2.5 4.5 13.5H11l-1 8 8.5-11H12z'/%3E%3C/g%3E%3C/svg%3E");
    --af-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
    --af-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.4 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10z'/%3E%3C/svg%3E");
}

/* ── البطاقة: أنعم وأعمق، بلا أيقونة في الرأس ── */
.auth-card { border-radius: 22px; box-shadow: var(--shadow-lg); }
.auth-head { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; }

/* ── زرّ الإرسال ── */
.auth-form .btn-block.btn-primary {
    position: relative; gap: 10px;
    min-height: 52px; border-radius: 14px;
    font-size: 1.03rem; font-weight: 800;
    box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--primary) 90%, transparent);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.auth-form .btn-block.btn-primary::after {   /* سهم يتبع اتجاه اللغة */
    content: ''; width: 18px; height: 18px; flex: none; background: currentColor;
    -webkit-mask: var(--af-arrow) center / contain no-repeat;
            mask: var(--af-arrow) center / contain no-repeat;
    transition: transform .2s;
}
[dir="rtl"] .auth-form .btn-block.btn-primary::after { transform: scaleX(-1); }
.auth-form .btn-block.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -16px color-mix(in srgb, var(--primary) 95%, transparent); }
.auth-form .btn-block.btn-primary:hover::after { transform: translateX(3px); }
[dir="rtl"] .auth-form .btn-block.btn-primary:hover::after { transform: scaleX(-1) translateX(3px); }
.auth-form .btn-block.btn-primary:active { transform: translateY(0) scale(.985); }

/* أثناء الإرسال: الزرّ «يُعجب» — ضغطة + قلب ينبض مكان السهم */
.auth-form .btn-block.btn-primary.is-liked { pointer-events: none; animation: af-pop .45s cubic-bezier(.3,.7,.3,1); }
.auth-form .btn-block.btn-primary.is-liked::after {
    -webkit-mask-image: var(--af-heart); mask-image: var(--af-heart);
    transform: none; animation: af-beat .55s ease-in-out infinite;
}
@keyframes af-pop  { 0% { transform: scale(1); } 35% { transform: scale(.94); } 70% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes af-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* ── القلوب الطائرة (عناصر يضيفها السكربت إلى body ثم يحذفها) ── */
.af-heart {
    position: fixed; z-index: 9999; pointer-events: none;
    left: var(--x, 50%); top: var(--y, 50%);   /* القيم الحقيقية يضعها السكربت لكل قلب */
    width: var(--s, 22px); height: var(--s, 22px);
    color: var(--c, #ff3b5c); opacity: 0;
    transform: translate(-50%, -50%);
    animation: af-fly 950ms cubic-bezier(.15, .75, .3, 1) var(--d, 0ms) forwards;
}
.af-heart svg { display: block; width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .18)); }
@keyframes af-fly {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
    15%  { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -120px))) scale(1) rotate(var(--r, 0deg)); }
}

@media (prefers-reduced-motion: reduce) {
    .af-heart { display: none; }
    .auth-form .btn-block.btn-primary.is-liked,
    .auth-form .btn-block.btn-primary.is-liked::after { animation: none; }
}
