/* Al-Attar — auth.css */


/* =========================================================
   OVERLAY
========================================================= */

.auth-ov{
    position:fixed;
    inset:0;
    background:rgba(20,30,20,.4);
    z-index:200;
    animation:authfade .2s;
}

@keyframes authfade{
    from{opacity:0}
    to{opacity:1}
}


/* =========================================================
   MAIN AUTH PANEL
========================================================= */

.auth-panel{
    position:fixed;
    top:50%;
    left:50%;
    right:auto;
    transform:translate(-50%,-50%);
    z-index:201;

    width:380px;
    max-width:calc(100vw - 32px);

    max-height:calc(100vh - 60px);
    overflow-y:auto;

    background:#fff;

    border-radius:18px;

    box-shadow:
            0 30px 70px
            rgba(12,32,22,.35);

    font-family:
            'Tajawal',
            system-ui,
            sans-serif;

    animation:
            authpop
            .25s
            cubic-bezier(.2,.9,.3,1);
}


@keyframes authpop{

    from{
        transform:
                translate(-50%,-46%)
                scale(.96);

        opacity:0;
    }

    to{
        transform:
                translate(-50%,-50%)
                scale(1);

        opacity:1;
    }
}


/* =========================================================
   PANEL HEADER
========================================================= */

.auth-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:16px 18px;

    border-bottom:
            1px solid
            var(--line,#e7ded0);

    background:
            var(--green,#1d5632);

    color:#fff;

    border-radius:
            18px 18px 0 0;
}


.auth-x{
    background:
            rgba(255,255,255,.16);

    border:none;

    color:#fff;

    border-radius:8px;

    width:28px;
    height:28px;

    font-size:13px;
}


.auth-panel-body{
    padding:20px 18px;
}


/* =========================================================
   FORM
========================================================= */

.auth-field{
    width:100%;

    box-sizing:border-box;

    border:
            1px solid
            var(--line,#e7ded0);

    border-radius:11px;

    padding:12px 14px;

    font-size:14px;

    font-family:inherit;

    margin-bottom:10px;

    outline:none;
}


.auth-field:focus{
    border-color:
            var(--green,#1d5632);
}


.auth-submit{
    width:100%;

    background:
            var(--green,#1d5632);

    color:#fff;

    border:none;

    border-radius:11px;

    padding:13px;

    font-size:14.5px;

    font-weight:700;

    margin-top:4px;
}


.auth-submit:disabled{
    opacity:.6;
    cursor:not-allowed;
}


.auth-submit:hover:not(:disabled){
    background:
            var(--green-dk,#143d24);
}


.auth-switch{
    display:block;

    width:100%;

    background:none;

    border:none;

    color:
            var(--green,#1d5632);

    font-size:13px;

    text-align:center;

    margin-top:14px;

    font-weight:700;
}


/* =========================================================
   ERROR / SUCCESS
========================================================= */

.auth-err{
    background:#fdf3ef;

    color:#8a3421;

    border:
            1px solid #f0d8d0;

    border-radius:10px;

    padding:10px 12px;

    font-size:12.5px;

    margin-bottom:12px;
}


.auth-ok{
    background:#edf8f0;

    color:#24723c;

    border:
            1px solid #cfe8d6;

    border-radius:10px;

    padding:10px 12px;

    font-size:12.5px;

    margin-bottom:12px;
}


/* =========================================================
   SOCIAL LOGIN
========================================================= */

.auth-social{
    display:flex;
    flex-direction:column;
    gap:9px;
    margin-bottom:16px;
}


.auth-social-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;

    width:100%;

    background:#fff;

    border:
            1px solid
            var(--line,#e7ded0);

    border-radius:11px;

    padding:11px;

    font-size:13.5px;

    font-weight:700;

    font-family:inherit;

    color:
            var(--ink,#20180f);

    transition:
            background .2s,
            border-color .2s;
}


.auth-social-btn img{
    width:18px;
    height:18px;
    flex-shrink:0;
}


.auth-social-btn:hover{
    background:
            var(--paper2,#f2ece0);

    border-color:#d8cfbc;
}


.auth-social-btn.facebook{
    color:#1877f2;

    border-color:#c9dcfb;
}


.auth-social-btn.facebook:hover{
    background:#f2f7ff;
}


/* =========================================================
   OR DIVIDER
========================================================= */

.auth-or{
    position:relative;

    text-align:center;

    margin:4px 0 16px;
}


.auth-or::before{
    content:"";

    position:absolute;

    top:50%;

    inset-inline-start:0;
    inset-inline-end:0;

    height:1px;

    background:
            var(--line,#e7ded0);
}


.auth-or span{
    position:relative;

    background:#fff;

    padding:0 12px;

    font-size:11.5px;

    color:
            var(--muted,#7a705f);
}


/* =========================================================
   LOADING / EMPTY
========================================================= */

.auth-loading,
.auth-empty{
    text-align:center;

    color:
            var(--muted,#7a705f);

    padding:30px 0;

    font-size:13.5px;
}


/* =========================================================
   ACCOUNT MENU
========================================================= */

.auth-menu{
    position:fixed;

    top:74px;

    inset-inline-end:22px;

    z-index:201;

    width:220px;

    background:#fff;

    border-radius:14px;

    box-shadow:
            0 20px 50px
            rgba(12,32,22,.25);

    overflow:hidden;

    font-family:
            'Tajawal',
            system-ui,
            sans-serif;

    animation:
            authpop
            .18s ease;
}


.auth-menu-hi{
    padding:14px 16px;

    font-weight:700;

    font-size:13.5px;

    color:
            var(--green-dk,#143d24);

    border-bottom:
            1px solid
            var(--line,#e7ded0);
}


.auth-menu-item{
    display:block;

    width:100%;

    box-sizing:border-box;

    text-align:start;

    background:none;

    border:none;

    padding:12px 16px;

    font-size:13.5px;

    color:
            var(--ink,#20180f);

    font-family:inherit;

    text-decoration:none;
}


.auth-menu-item:hover{
    background:
            var(--paper2,#f2ece0);
}


.auth-menu-item.danger{
    color:#a8442b;
}


/* =========================================================
   ORDER HISTORY
========================================================= */

.order-card{
    border:
            1px solid
            var(--line,#e7ded0);

    border-radius:12px;

    padding:12px 13px;

    margin-bottom:10px;
}


.order-card-h{
    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:8px;

    font-size:12.5px;
}


.order-status{
    background:
            var(--paper2,#f2ece0);

    color:
            var(--green-dk,#143d24);

    border-radius:999px;

    padding:3px 10px;

    font-size:11px;

    font-weight:700;
}


.oi-row{
    display:flex;

    justify-content:space-between;

    gap:12px;

    font-size:12.5px;

    color:
            var(--muted,#7a705f);

    padding:3px 0;
}


.order-card-total{
    display:flex;

    justify-content:space-between;

    border-top:
            1px solid
            var(--line,#e7ded0);

    margin-top:8px;

    padding-top:8px;

    font-size:13.5px;
}


/* =========================================================
   ACCOUNT ICON
========================================================= */

.accounticon{
    position:relative;

    background:none;

    border:none;

    font-size:19px;

    color:
            var(--green,#1d5632);

    padding:0 2px;

    cursor:pointer;
}


.accounticon.logged-in::after{
    content:"";

    position:absolute;

    top:-2px;

    inset-inline-end:-2px;

    width:8px;
    height:8px;

    border-radius:50%;

    background:#8fdca8;

    border:2px solid #fff;
}


/* =========================================================
   LOYALTY REWARDS
========================================================= */

.rewards-panel{
    width:430px;
}


.reward-balance{
    display:grid;

    grid-template-columns:
    1fr 1fr;

    gap:10px;

    margin-bottom:10px;
}


.reward-balance > div{
    background:
            var(--paper2,#f2ece0);

    border-radius:12px;

    padding:14px;
}


.reward-balance span{
    display:block;

    font-size:11.5px;

    color:
            var(--muted,#7a705f);

    margin-bottom:5px;
}


.reward-balance b{
    font-size:18px;

    color:
            var(--green-dk,#143d24);
}


.reward-expiry{
    padding:9px 11px;

    background:#f7f4e9;

    border-radius:9px;

    color:#7d621d;

    font-size:11.5px;

    margin-bottom:10px;
}


.reward-rule{
    font-size:11.5px;

    line-height:1.65;

    color:
            var(--muted,#7a705f);

    padding-bottom:14px;

    border-bottom:
            1px solid
            var(--line,#e7ded0);
}


.reward-history{
    margin-top:10px;
}


.reward-tx{
    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:12px;

    padding:10px 2px;

    border-bottom:
            1px solid
            var(--line,#e7ded0);
}


.reward-tx div{
    min-width:0;
}


.reward-tx b{
    display:block;

    font-size:12.5px;

    color:
            var(--ink,#20180f);
}


.reward-tx span{
    display:block;

    font-size:10.5px;

    color:
            var(--muted,#7a705f);

    margin-top:2px;
}


.reward-tx strong{
    font-size:13px;
}


.reward-tx strong.plus{
    color:
            var(--green,#1d5632);
}


.reward-tx strong.minus{
    color:#a8442b;
}


/* =========================================================
   PROFILE EDITOR
========================================================= */

.profile-panel{
    width:430px;
}


.auth-label{
    display:block;

    font-size:12px;

    font-weight:700;

    color:
            var(--green-dk,#143d24);

    margin:
            2px 0 6px;
}


.auth-field-readonly{
    background:
            var(--paper2,#f2ece0);

    color:
            var(--muted,#7a705f);

    cursor:not-allowed;
}


.auth-help{
    font-size:11px;

    color:
            var(--muted,#7a705f);

    margin:
            -2px 2px 14px;

    line-height:1.5;
}


/* =========================================================
   MOBILE
========================================================= */

@media(max-width:520px){

    .auth-panel,
    .profile-panel,
    .rewards-panel{
        width:
                calc(100vw - 24px);

        max-width:
                calc(100vw - 24px);
    }


    .auth-menu{
        inset-inline-end:12px;

        width:
                min(
                        240px,
                        calc(100vw - 24px)
                );
    }


    .reward-balance{
        grid-template-columns:1fr;
    }

}
.auth-social-mark{width:20px;height:20px;display:inline-grid;place-items:center;flex:none;border-radius:50%;font-weight:800;font-family:Arial,sans-serif;color:#3c4043}
.auth-social-mark-fb{color:#1877f2;font-size:20px}

/* =========================================================
   EMAIL CONFIRMATION POPUP
========================================================= */
#auth-email-confirmation{
  position:fixed;
  inset:0;
  z-index:10050;
  display:grid;
  place-items:center;
  padding:20px;
}

.auth-confirm-ov{
  position:absolute;
  inset:0;
  background:rgba(20, 29, 23, .58);
  backdrop-filter:blur(3px);
}

.auth-confirm-card{
  position:relative;
  z-index:1;
  width:min(430px, 100%);
  background:#fff;
  border-radius:24px;
  padding:30px 28px 26px;
  box-shadow:0 24px 70px rgba(0,0,0,.22);
  text-align:center;
  color:#173b2a;
}

.auth-confirm-icon{
  width:62px;
  height:62px;
  margin:0 auto 16px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#eef7f0;
  color:#0b6b3a;
  font-size:30px;
  font-weight:800;
}

.auth-confirm-card h3{
  margin:0 0 10px;
  font-size:22px;
  line-height:1.35;
}

.auth-confirm-card p{
  margin:0;
  color:#59645e;
  line-height:1.8;
  font-size:15px;
}

.auth-confirm-card b{
  color:#173b2a;
  overflow-wrap:anywhere;
}

.auth-confirm-btn{
  width:100%;
  margin-top:22px;
  min-height:46px;
  border:0;
  border-radius:14px;
  background:#0b6b3a;
  color:#fff;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

.auth-confirm-btn:hover{
  filter:brightness(.96);
}



/* Optional location capture on signup */
.auth-location-btn{
    width:100%;
    border:1px solid var(--line,#e7ded0);
    background:#fff;
    color:var(--green,#1d5632);
    border-radius:11px;
    padding:11px 13px;
    font-size:13px;
    font-weight:700;
    margin:-1px 0 7px;
}
.auth-location-btn:hover:not(:disabled){background:var(--paper2,#f2ece0)}
.auth-location-btn:disabled{opacity:.65;cursor:wait}
.auth-location-note{
    font-size:11px;
    color:var(--muted,#7a705f);
    line-height:1.55;
    margin:0 2px 11px;
}
.auth-location-note.is-ok{color:var(--green,#1d5632);font-weight:700}
.auth-location-note.is-error{color:#a8442b}
