@font-face {
  font-family: "TC Kufi";
  src: local("Noto Kufi Arabic"), local("NotoKufiArabic");
  font-display: swap;
}

:root {
  --tc-ink: #152a36;
  --tc-muted: #6d7f89;
  --tc-line: #d3dde2;
  --tc-paper: #f5f7f7;
  --tc-card: #ffffff;
  --tc-deep: #172f3c;
  --tc-accent: #5d7e92;
  --tc-warm: #d7ad83;
  --tc-shadow: 0 18px 50px rgba(24, 48, 61, 0.1);
}

html[data-theme="dark"] {
  --tc-ink: #edf4f6;
  --tc-muted: #aebdc4;
  --tc-line: #38505c;
  --tc-paper: #0f171c;
  --tc-card: #182730;
  --tc-deep: #0d202a;
  --tc-accent: #8eb1c5;
  --tc-warm: #e0b487;
  --tc-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

body.tc-account-skin {
  margin: 0;
  color: var(--tc-ink);
  background: var(--tc-paper) !important;
  font-family: "TC Kufi", "Noto Kufi Arabic", Tahoma, sans-serif !important;
  direction: rtl;
}
body.tc-account-skin *,
body.tc-account-skin *::before,
body.tc-account-skin *::after { box-sizing: border-box; }

html[data-font="system"] body.tc-account-skin,
html[data-font="sans"] body.tc-account-skin { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif !important; }
html[data-font-size="compact"] body.tc-account-skin { font-size: 14px; }
html[data-font-size="large"] body.tc-account-skin { font-size: 18px; }

body.tc-account-skin #baghdad-topbar,
body.tc-account-skin > .tc-iosbar-wrapper,
body.tc-account-skin .template-container header.elementor-location-header,
body.tc-account-skin .template-container .page-heading,
body.tc-account-skin > footer.elementor-location-footer {
  display: none !important;
}

body.tc-account-skin .template-container,
body.tc-account-skin .template-content,
body.tc-account-skin .page-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--tc-paper) !important;
}

.tc-account-shell {
  position: sticky;
  inset-block-start: 0;
  z-index: 1000;
  padding: 12px clamp(18px, 4vw, 64px);
  background: color-mix(in srgb, var(--tc-paper) 90%, transparent);
  border-bottom: 1px solid var(--tc-line);
  backdrop-filter: blur(18px);
}

.tc-account-shell__bar {
  max-width: 1440px;
  min-height: 78px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr auto;
  align-items: center;
  gap: 28px;
}

.tc-account-shell__brand { display: block; width: min(250px, 100%); }
.tc-account-shell__logo,
.tc-account-footer__logo { display: block; width: 100%; height: auto; }
.tc-account-shell__logo--night,
.tc-account-footer__logo--night { display: none; }
html[data-theme="dark"] .tc-account-shell__logo--day,
html[data-theme="dark"] .tc-account-footer__logo--day { display: none; }
html[data-theme="dark"] .tc-account-shell__logo--night,
html[data-theme="dark"] .tc-account-footer__logo--night { display: block; }

.tc-account-shell__nav,
.tc-account-shell__actions { display: flex; align-items: center; gap: 8px; }
.tc-account-shell a,
.tc-account-footer a,
.tc-account-mobile-dock a { color: inherit; text-decoration: none; }
.tc-account-shell__nav a,
.tc-account-shell__actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
}
.tc-account-shell__nav a:hover,
.tc-account-shell__nav .is-current { background: color-mix(in srgb, var(--tc-accent) 13%, transparent); }
.tc-account-shell__actions a { border: 1px solid var(--tc-line); }
.tc-account-shell__actions .is-primary { color: #fff; background: var(--tc-deep); border-color: var(--tc-deep); }

body.tc-account-skin .container.content-page {
  width: min(1280px, calc(100% - 36px)) !important;
  max-width: 1280px !important;
  min-height: 58vh;
  margin: 34px auto 56px !important;
  padding: clamp(22px, 4vw, 54px) !important;
  background: var(--tc-card);
  border: 1px solid var(--tc-line);
  border-radius: 32px;
  box-shadow: var(--tc-shadow);
}

body.tc-account-skin .woocommerce { color: var(--tc-ink); }
body.tc-account-skin .woocommerce::before {
  content: "حسابي";
  display: block;
  margin-bottom: 26px;
  color: var(--tc-ink);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  grid-area: heading;
}

body.tc-account-skin .woocommerce-MyAccount-navigation-wrapper,
body.tc-account-skin .woocommerce-MyAccount-navigation,
body.tc-account-skin .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
}
body.tc-account-skin.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-areas: "heading heading" "nav content";
  gap: 28px;
}
body.tc-account-skin .woocommerce > .u-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
body.tc-account-skin .woocommerce .u-column1,
body.tc-account-skin .woocommerce .u-column2 { float: none !important; width: auto !important; }
body.tc-account-skin .woocommerce-MyAccount-navigation ul {
  margin: 0 !important;
  padding: 10px !important;
  list-style: none;
  background: var(--tc-deep);
  border-radius: 22px;
}
body.tc-account-skin .woocommerce-MyAccount-navigation-wrapper {
  grid-area: nav;
  display: block !important;
  margin: 0 !important;
  border: 0 !important;
}
body.tc-account-skin .woocommerce-MyAccount-navigation li { margin: 0 !important; border: 0 !important; }
body.tc-account-skin .woocommerce-MyAccount-navigation a {
  min-height: 50px;
  display: flex !important;
  align-items: center;
  padding: 8px 16px !important;
  color: #dce8ed !important;
  border-radius: 14px;
  font-weight: 700;
}
body.tc-account-skin .woocommerce-MyAccount-navigation .is-active a,
body.tc-account-skin .woocommerce-MyAccount-navigation a:hover { color: #fff !important; background: rgba(255,255,255,.12); }
body.tc-account-skin .woocommerce-MyAccount-content { grid-area: content; min-width: 0; padding: 4px 8px; }
body.tc-account-skin .woocommerce-MyAccount-content > *:first-child { margin-top: 0; }

body.tc-account-skin .woocommerce form,
body.tc-account-skin .woocommerce .u-column1,
body.tc-account-skin .woocommerce .u-column2,
body.tc-account-skin .woocommerce table.shop_table,
body.tc-account-skin .woocommerce-Address,
body.tc-account-skin .woocommerce-order-details {
  background: color-mix(in srgb, var(--tc-card) 92%, var(--tc-accent) 8%);
  border: 1px solid var(--tc-line) !important;
  border-radius: 20px !important;
  padding: 22px !important;
  box-shadow: none !important;
}

body.tc-account-skin .woocommerce label { color: var(--tc-ink); font-weight: 700; }
body.tc-account-skin .woocommerce input:not([type="checkbox"]):not([type="radio"]),
body.tc-account-skin .woocommerce select,
body.tc-account-skin .woocommerce textarea {
  min-height: 50px;
  width: 100%;
  color: var(--tc-ink) !important;
  background: var(--tc-card) !important;
  border: 1px solid var(--tc-line) !important;
  border-radius: 13px !important;
  font: inherit !important;
}

body.tc-account-skin .woocommerce button.button,
body.tc-account-skin .woocommerce a.button,
body.tc-account-skin .woocommerce input.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px !important;
  color: #fff !important;
  background: var(--tc-deep) !important;
  border: 0 !important;
  border-radius: 14px !important;
  font: inherit !important;
  font-weight: 800 !important;
}

body.tc-account-skin .woocommerce-error,
body.tc-account-skin .woocommerce-info,
body.tc-account-skin .woocommerce-message {
  color: var(--tc-ink);
  background: color-mix(in srgb, var(--tc-card) 86%, var(--tc-accent) 14%);
  border: 1px solid var(--tc-line);
  border-radius: 16px;
}

body.tc-account-skin .nsl-container,
body.tc-account-skin .cf-turnstile { max-width: 100%; overflow: hidden; }

.tc-account-footer {
  padding: 34px clamp(20px, 5vw, 72px) 42px;
  display: grid;
  grid-template-columns: minmax(190px, 300px) 1fr auto;
  align-items: center;
  gap: 34px;
  color: #dbe8ed;
  background: var(--tc-deep);
}
.tc-account-footer__brand { max-width: 270px; }
.tc-account-footer__brand p { margin: 10px 0 0; color: #b7c8cf; }
.tc-account-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; }
.tc-account-footer a { color: #edf4f6; font-weight: 700; }
.tc-account-footer small { color: #9fb2bb; direction: ltr; }
.tc-account-mobile-dock { display: none; }

@media (max-width: 920px) {
  .tc-account-shell__bar { grid-template-columns: minmax(160px, 220px) 1fr; }
  .tc-account-shell__nav { display: none; }
  .tc-account-shell__actions { justify-content: end; }
  body.tc-account-skin.woocommerce-account .woocommerce {
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "nav" "content";
  }
  body.tc-account-skin .woocommerce > .u-columns { grid-template-columns: 1fr; }
  body.tc-account-skin .woocommerce-MyAccount-navigation ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
  .tc-account-footer { grid-template-columns: 1fr; text-align: center; }
  .tc-account-footer__brand { margin: auto; }
}

@media (max-width: 600px) {
  body.tc-account-skin { padding-bottom: 72px; }
  .tc-account-shell { padding: 8px 14px; }
  .tc-account-shell__bar { min-height: 62px; grid-template-columns: minmax(138px, 1fr) auto; gap: 12px; }
  .tc-account-shell__brand { width: 170px; }
  .tc-account-shell__actions a:first-child { display: none; }
  .tc-account-shell__actions a { min-height: 42px; padding: 0 13px; }
  body.tc-account-skin .container.content-page { width: calc(100% - 20px) !important; margin: 14px auto 26px !important; padding: 18px 14px 24px !important; border-radius: 22px; }
  body.tc-account-skin .woocommerce::before { margin-bottom: 18px; font-size: 30px; }
  body.tc-account-skin .woocommerce-MyAccount-navigation ul { grid-template-columns: 1fr 1fr; padding: 7px !important; }
  body.tc-account-skin .woocommerce-MyAccount-navigation a { min-height: 46px; padding: 7px 10px !important; font-size: .9em; }
  body.tc-account-skin .woocommerce-MyAccount-content { padding: 18px 2px 0; }
  body.tc-account-skin .woocommerce form,
  body.tc-account-skin .woocommerce .u-column1,
  body.tc-account-skin .woocommerce .u-column2,
  body.tc-account-skin .woocommerce table.shop_table,
  body.tc-account-skin .woocommerce-Address,
  body.tc-account-skin .woocommerce-order-details { padding: 16px !important; border-radius: 16px !important; }
  .tc-account-footer { padding: 28px 18px; }
  .tc-account-footer nav { display: grid; grid-template-columns: 1fr 1fr; }
  .tc-account-mobile-dock {
    position: fixed;
    z-index: 1200;
    inset-inline: 10px;
    inset-block-end: max(8px, env(safe-area-inset-bottom));
    min-height: 58px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    align-items: center;
    padding: 5px;
    background: color-mix(in srgb, var(--tc-deep) 94%, transparent);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,.24);
    backdrop-filter: blur(16px);
  }
  .tc-account-mobile-dock a { min-width: 0; padding: 9px 3px; color: #c8d7de; text-align: center; font-size: 12px; font-weight: 700; border-radius: 12px; }
  .tc-account-mobile-dock .is-current { color: #fff; background: rgba(255,255,255,.13); }
}

@media (prefers-reduced-motion: reduce) {
  body.tc-account-skin *, body.tc-account-skin *::before, body.tc-account-skin *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
