/* ============================================================================
 * Pershume — My Account + Login/Register styles.
 * Loaded AFTER woocommerce.css on is_account_page(), so it reuses the :root
 * tokens (--accent / --ink / --line / --paper / --gut …) and extends — not
 * duplicates — the base WC styling there. Mobile-first (390px), RTL, Vazirmatn.
 *
 * The SMS Suite OTP card (.sms-suite-wc-wrap) is styled by the plugin itself
 * (it reads --wd-primary-color / --wd-link-color from :root); here we only
 * position/centre it inside the auth layout — we never override its internals.
 * ========================================================================== */

/* ======================================================================== */
/* LOGIN / REGISTER                                                          */
/* ======================================================================== */
.acc-auth.login-shell{
  max-width:920px;
  margin:0 auto;
  padding:clamp(8px,3vw,28px) 0 8px;
}

/* branding head */
.login-head{text-align:center;margin-bottom:clamp(20px,4vw,30px)}
.login-head .login-logo{display:inline-flex;align-items:center;justify-content:center;margin-bottom:16px}
.login-head .login-logo img{height:42px;width:auto}
.login-title{font-size:clamp(22px,5vw,30px);font-weight:800;letter-spacing:-.01em;line-height:1.3}
.login-sub{font-size:clamp(13px,3.4vw,14.5px);color:var(--ink-soft);font-weight:300;margin-top:8px;max-width:42ch;margin-inline:auto;line-height:1.9}

/* centre the SMS OTP card within the auth column */
.login-shell .sms-suite-wc-wrap{margin-inline:auto;margin-bottom:22px}

/* columns: single = one centred card; with register = two side by side */
.login-cols{display:grid;gap:clamp(16px,2.4vw,28px)}
.login-cols--single{max-width:460px;margin-inline:auto}
.login-shell--reg .login-cols{grid-template-columns:1fr 1fr}
.login-col{min-width:0}

/* the auth card */
.login-card{
  border:1px solid var(--line);border-radius:18px;background:var(--paper);
  padding:clamp(20px,4vw,28px);
  box-shadow:0 1px 2px rgba(20,18,40,.04);
}
.login-card-h{font-size:16.5px;font-weight:800;margin-bottom:18px;display:flex;align-items:center;gap:9px}
.login-card-h::before{content:"";width:4px;height:18px;border-radius:4px;background:var(--accent);flex:none}

/* fields — big, iOS-safe (16px = no zoom), ≥48px tall */
.login-card .form-row{margin:0 0 16px}
.login-card label{font-size:13px;font-weight:600;color:var(--ink);margin-bottom:7px;display:block}
.login-card .required{color:var(--accent-deep);text-decoration:none}
.login-card input.input-text,
.login-card input[type=text],
.login-card input[type=email],
.login-card input[type=password]{
  width:100%;box-sizing:border-box;min-height:52px;padding:13px 15px;
  font-family:inherit;font-size:16px;color:var(--ink);
  background:#fff;border:1.5px solid var(--line);border-radius:12px;
  transition:border-color .2s,box-shadow .2s;
}
.login-card input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(107,107,179,.15);outline:0}

/* remember-me + submit row */
.login-actions-row{display:flex;flex-direction:column;gap:14px;align-items:stretch;margin:4px 0 0}
.woocommerce-form-login__rememberme{display:inline-flex;align-items:center;gap:9px;font-size:13.5px;color:var(--ink-soft);font-weight:500;cursor:pointer;margin:0}
.woocommerce-form-login__rememberme input{width:18px;height:18px;accent-color:var(--accent);flex:none}

/* submit buttons — full-width, brand, tall tap target */
.login-card button.button,
.login-card .woocommerce-form-login__submit,
.login-card .woocommerce-form-register__submit{
  width:100%;min-height:52px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--accent);color:#fff;border:1px solid var(--accent);border-radius:12px;
  font-family:inherit;font-size:15.5px;font-weight:800;letter-spacing:.01em;cursor:pointer;
  box-shadow:0 8px 18px -10px rgba(107,107,179,.7);transition:background .2s,box-shadow .2s;
}
.login-card button.button:hover{background:var(--accent-deep);border-color:var(--accent-deep);box-shadow:0 12px 22px -10px rgba(84,84,154,.8)}

.login-card .lost_password{margin:14px 0 0;text-align:center;font-size:13px}
.login-card .lost_password a{color:var(--accent-deep);font-weight:600}
.login-card .lost_password a:hover{text-decoration:underline}

/* register hint paragraph */
.login-card .woocommerce-form-register p:not(.form-row){font-size:13px;color:var(--ink-soft);line-height:1.9;margin:0 0 14px}

/* reassurance row under the cards */
.login-trust{
  list-style:none;margin:clamp(22px,4vw,32px) 0 0;padding:0;
  display:grid;grid-template-columns:repeat(3,1fr);gap:12px;
}
.login-trust li{
  display:flex;align-items:center;gap:10px;justify-content:center;text-align:center;
  border:1px solid var(--line-soft);border-radius:14px;background:var(--paper-2);
  padding:14px 12px;font-size:12.5px;font-weight:600;color:var(--ink-soft);line-height:1.5;
}
.login-trust svg{width:22px;height:22px;flex:none;fill:none;stroke:var(--accent);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* ======================================================================== */
/* MY ACCOUNT — shell + sidebar                                              */
/* ======================================================================== */
.acc-shell{
  display:grid;grid-template-columns:264px 1fr;
  gap:clamp(20px,3vw,40px);align-items:start;
}

/* navigation card — override the horizontal-tab base in woocommerce.css */
.acc-nav.woocommerce-MyAccount-navigation{
  position:sticky;top:96px;
  border:1px solid var(--line);border-radius:18px;background:var(--paper);
  padding:16px;box-shadow:0 1px 2px rgba(20,18,40,.04);
}

/* user header */
.acc-user{display:flex;align-items:center;gap:12px;padding:6px 6px 16px;margin-bottom:12px;border-bottom:1px solid var(--line-soft)}
.acc-avatar{flex:none;width:48px;height:48px;border-radius:50%;overflow:hidden;border:1px solid var(--line);background:var(--paper-2)}
.acc-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.acc-user-meta{display:flex;flex-direction:column;min-width:0;line-height:1.4}
.acc-user-name{font-size:14.5px;font-weight:800;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acc-user-sub{font-size:12px;color:var(--ink-soft);font-weight:600;margin-top:2px}

/* nav links — reset the base flex/border-bottom tabs into a vertical list */
.acc-nav.woocommerce-MyAccount-navigation ul{display:block;margin:0;padding:0;border:0;gap:0}
.acc-nav.woocommerce-MyAccount-navigation li{display:block;margin:0}
.acc-nav.woocommerce-MyAccount-navigation li a{
  display:flex;align-items:center;gap:11px;
  padding:12px 12px;border:0;border-radius:12px;
  font-size:14px;font-weight:600;color:var(--ink-soft);
  min-height:46px;transition:background .2s,color .2s;
}
.acc-nav .acc-nav-ic{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
.acc-nav-lb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acc-nav.woocommerce-MyAccount-navigation li a:hover{background:var(--paper-2);color:var(--ink)}
.acc-nav.woocommerce-MyAccount-navigation li.is-active a{
  background:var(--accent);color:#fff;border:0;
  box-shadow:0 8px 18px -10px rgba(107,107,179,.7);
}
.acc-nav.woocommerce-MyAccount-navigation li.is-active a .acc-nav-ic{opacity:1}
.acc-nav.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a{color:var(--accent-deep)}
.acc-nav.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout.is-active a{color:#fff}
.acc-nav-badge{
  margin-inline-start:auto;flex:none;
  font-size:11px;font-weight:700;color:var(--ink-soft);background:var(--line-soft);
  border-radius:20px;min-width:20px;height:20px;padding:0 6px;
  display:inline-flex;align-items:center;justify-content:center;
}
.acc-nav.woocommerce-MyAccount-navigation li.is-active a .acc-nav-badge{background:rgba(255,255,255,.25);color:#fff}

/* content column */
.acc-content{min-width:0;font-size:14px;line-height:1.9}

/* ======================================================================== */
/* DASHBOARD                                                                 */
/* ======================================================================== */
.acc-dash{display:flex;flex-direction:column;gap:clamp(18px,3vw,26px)}

.acc-hero{
  display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  border:1px solid var(--line);border-radius:18px;
  padding:clamp(20px,4vw,30px);
  background:radial-gradient(130% 120% at 100% 0%, rgba(107,107,179,.1) 0%, transparent 55%), var(--paper);
}
.acc-hero-eyebrow{font-size:11px;letter-spacing:.14em;color:var(--accent-deep);font-weight:700}
.acc-hero-title{font-size:clamp(19px,4.4vw,26px);font-weight:800;line-height:1.4;margin-top:8px}
.acc-hero-title b{color:var(--accent-deep);font-weight:800}
.acc-hero-sub{font-size:13.5px;color:var(--ink-soft);font-weight:300;line-height:1.95;margin-top:8px;max-width:52ch}
.acc-hero-cta{
  flex:none;display:inline-flex;align-items:center;gap:8px;
  background:var(--accent);color:#fff;border:1px solid var(--accent);border-radius:40px;
  padding:13px 22px;min-height:48px;font-size:13.5px;font-weight:700;
  box-shadow:0 10px 20px -12px rgba(107,107,179,.8);transition:.3s;
}
.acc-hero-cta:hover{background:var(--accent-deep);border-color:var(--accent-deep);gap:12px}
.acc-hero-cta .acc-arr{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s}
.acc-hero-cta:hover .acc-arr{transform:translateX(-4px)}

/* quick action cards */
.acc-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,1.8vw,16px)}
.acc-qcard{
  display:flex;align-items:center;gap:13px;
  border:1px solid var(--line);border-radius:16px;background:var(--paper);
  padding:16px;transition:border-color .25s,box-shadow .25s,transform .25s;
}
.acc-qcard:hover{border-color:rgba(107,107,179,.4);box-shadow:0 14px 30px -18px rgba(74,74,178,.5);transform:translateY(-3px)}
.acc-qic{flex:none;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:rgba(107,107,179,.1);color:var(--accent-deep)}
.acc-qic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.acc-qtxt{display:flex;flex-direction:column;gap:3px;min-width:0;line-height:1.4}
.acc-qtxt b{font-size:14.5px;font-weight:800;color:var(--ink)}
.acc-qtxt span{font-size:12px;color:var(--ink-soft);font-weight:400}

.acc-logout-note{font-size:13px;color:var(--ink-soft);line-height:1.9;margin:0}
.acc-logout-note b{color:var(--ink);font-weight:700}
.acc-logout-note a{color:var(--accent-deep);font-weight:700}
.acc-logout-note a:hover{text-decoration:underline}

/* ======================================================================== */
/* ORDERS / DOWNLOADS TABLES — readable cards on phones                      */
/* ======================================================================== */
.acc-content table.shop_table{width:100%}
.acc-content .woocommerce-orders-table__cell-order-actions a,
.acc-content .woocommerce-orders-table__cell a.button{margin:2px 0 2px 6px}

/* addresses → two stacked cards */
.acc-content .woocommerce-Addresses{display:grid;grid-template-columns:1fr 1fr;gap:clamp(14px,2vw,22px);margin-top:6px}
.acc-content .woocommerce-Address{border:1px solid var(--line);border-radius:16px;background:var(--paper);padding:20px}
.acc-content .woocommerce-Address-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.acc-content .woocommerce-Address-title h2,
.acc-content .woocommerce-Address-title h3{font-size:16px;font-weight:800;margin:0}
.acc-content .woocommerce-Address-title .edit{font-size:12.5px;font-weight:700;color:var(--accent-deep)}
.acc-content address{font-style:normal;font-size:13.5px;line-height:2;color:var(--ink-soft)}

/* edit-account form spacing */
.acc-content form .form-row{margin-bottom:16px}
.acc-content fieldset{border:1px solid var(--line);border-radius:16px;padding:18px;margin-top:18px}
.acc-content fieldset legend{font-size:14px;font-weight:800;padding:0 8px}

/* ======================================================================== */
/* DASHBOARD — quick stats + recent-orders panel                            */
/* ======================================================================== */
.acc-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.acc-stat{
  border:1px solid var(--line);border-radius:16px;padding:20px;background:var(--paper);
  transition:.3s;position:relative;overflow:hidden;
}
.acc-stat:hover{border-color:rgba(107,107,179,.34);box-shadow:0 12px 26px rgba(74,74,178,.07);transform:translateY(-3px)}
.acc-stat-ic{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;margin-bottom:14px;background:rgba(107,107,179,.1);color:var(--accent-deep)}
.acc-stat-ic svg{width:21px;height:21px}
.acc-stat-num{font-size:27px;font-weight:800;line-height:1;letter-spacing:-.01em;color:var(--ink)}
.acc-stat-lbl{font-size:12px;color:var(--ink-soft);font-weight:500;margin-top:7px}

.acc-panel{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--paper)}
.acc-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line-soft)}
.acc-panel-head h3{font-size:16px;font-weight:800;display:inline-flex;align-items:center;gap:9px;margin:0}
.acc-panel-head h3 svg{width:19px;height:19px;color:var(--accent-deep)}
.acc-panel-head a{font-size:12.5px;font-weight:700;color:var(--accent-deep);display:inline-flex;align-items:center;gap:7px;transition:gap .3s}
.acc-panel-head a:hover{gap:11px}
.acc-panel-arr{transition:transform .3s}
.acc-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.acc-orders{width:100%;border-collapse:collapse;min-width:520px}
table.acc-orders th{
  text-align:right;font-size:11px;font-weight:700;letter-spacing:.02em;color:var(--ink-soft);
  padding:13px 22px;background:var(--paper-2);border-bottom:1px solid var(--line-soft);white-space:nowrap;
}
table.acc-orders td{padding:15px 22px;border-bottom:1px solid var(--line-soft);font-size:13px;vertical-align:middle;white-space:nowrap}
table.acc-orders tr:last-child td{border-bottom:0}
table.acc-orders tbody tr{transition:background .25s}
table.acc-orders tbody tr:hover{background:var(--paper-2)}
.acc-ord-id{font-weight:700;color:var(--accent-deep);direction:ltr;display:inline-block}
.acc-ord-amount{font-weight:700;color:var(--ink)}
.acc-ord-action{color:var(--accent-deep);font-weight:700;font-size:12.5px}
.acc-ord-action:hover{text-decoration:underline}
.acc-pill{
  display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;
  padding:5px 12px;border-radius:30px;line-height:1.5;white-space:nowrap;
}
.acc-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.acc-pill-ok{color:#2e8b6f;background:#e7f4ef}
.acc-pill-ship{color:#4a4ab2;background:#ececfa}
.acc-pill-proc{color:#b07a13;background:#fbf2df}
.acc-pill-cancel{color:#b04848;background:#fbe9e9}

/* ======================================================================== */
/* WISHLIST endpoint                                                         */
/* ======================================================================== */
.acc-wish-empty,.acc-wish-loading{font-size:13.5px;color:var(--ink-soft);font-weight:300;line-height:1.9;padding:6px 0}
.acc-wish-grid{margin-top:6px}

/* ======================================================================== */
/* RESPONSIVE                                                                */
/* ======================================================================== */
@media(max-width:980px){
  .acc-shell{grid-template-columns:1fr}
  /* sidebar → horizontal, swipeable pill scroller pinned under the header */
  .acc-nav.woocommerce-MyAccount-navigation{position:static;padding:12px}
  .acc-user{padding:4px 4px 12px;margin-bottom:10px}
  .acc-nav.woocommerce-MyAccount-navigation ul{
    display:flex;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;padding-bottom:2px;margin-inline:calc(var(--gut)*-1);padding-inline:var(--gut);
  }
  .acc-nav.woocommerce-MyAccount-navigation ul::-webkit-scrollbar{display:none}
  .acc-nav.woocommerce-MyAccount-navigation li{flex:0 0 auto}
  .acc-nav.woocommerce-MyAccount-navigation li a{
    border:1px solid var(--line);border-radius:30px;padding:10px 16px;white-space:nowrap;background:var(--paper);
  }
  .acc-nav.woocommerce-MyAccount-navigation li.is-active a{border-color:var(--accent)}
}
@media(max-width:768px){
  .login-shell--reg .login-cols{grid-template-columns:1fr}
  .acc-quick{grid-template-columns:1fr}
  .acc-content .woocommerce-Addresses{grid-template-columns:1fr}
  .acc-stats{grid-template-columns:1fr;gap:12px}
  .acc-stat{display:flex;align-items:center;gap:16px;padding:16px 18px}
  .acc-stat-ic{margin-bottom:0}

  /* card-ify the responsive WC tables (theme drops WC's own responsive CSS) */
  .acc-content table.shop_table_responsive{border:0;border-radius:0;overflow:visible}
  .acc-content table.shop_table_responsive thead{display:none}
  .acc-content table.shop_table_responsive tbody tr{
    display:block;border:1px solid var(--line);border-radius:14px;background:var(--paper);
    padding:6px 14px;margin-bottom:14px;
  }
  .acc-content table.shop_table_responsive tbody tr td{
    display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;
    padding:11px 0;border:0;border-bottom:1px solid var(--line-soft);
  }
  .acc-content table.shop_table_responsive tbody tr td:last-child{border-bottom:0}
  .acc-content table.shop_table_responsive tbody tr td::before{
    content:attr(data-title);font-weight:700;color:var(--ink-soft);font-size:12.5px;flex:none;
  }
  .acc-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions{flex-wrap:wrap;justify-content:flex-start}
  .acc-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions::before{width:100%}
}
@media(max-width:560px){
  .login-trust{grid-template-columns:1fr}
  .login-trust li{justify-content:flex-start;text-align:right}
  .acc-hero-cta{width:100%;justify-content:center}
}

/* WC show/hide-password eye renders as a broken 4×4 box — hide it */
.woocommerce form .password-input .show-password-input{display:none}
