
/* Frontend styles for TCR */
:root{ --tcr-highlight:#540d6e; --tcr-highlight-08: rgba(84,13,110,.08); --tcr-highlight-12: rgba(84,13,110,.12); --tcr-highlight-18: rgba(84,13,110,.18); --tcr-highlight-24: rgba(84,13,110,.24); --tcr-highlight-34: rgba(84,13,110,.34);
  --tcr-border: rgba(0,0,0,.10); --tcr-bg: #fff; --tcr-muted:#6b7280; --tcr-text:#111827; }

/* Woo MyAccount navigation - make it crisp & on-brand */
.woocommerce-MyAccount-navigation{
  background: #fff;
  border: 1px solid var(--tcr-border);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.05);
}
.woocommerce-MyAccount-navigation ul{ margin:0; padding:0; list-style:none; }
.woocommerce-MyAccount-navigation ul li{ margin:0; padding:0; }
.woocommerce-MyAccount-navigation ul li a{
  display:block;
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 12px;
  background: #f6f4f9;
  border: 1px solid rgba(0,0,0,.08);
  color: var(--tcr-text);
  font-weight: 800;
  text-decoration:none;
}
.woocommerce-MyAccount-navigation ul li a:hover{
  background: var(--tcr-highlight-12);
  border-color: var(--tcr-highlight-34);
}
.woocommerce-MyAccount-navigation ul li.is-active a{
  background: var(--tcr-highlight);
  border-color: var(--tcr-highlight);
  color: #fff;
  box-shadow: 0 10px 22px var(--tcr-highlight-24);
}

/* Extra emphasis for our menu item */
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--certificate-request a{
  background: rgba(84,13,110,.16);
  border-color: var(--tcr-highlight-34);
}
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--certificate-request.is-active a,
.woocommerce-MyAccount-navigation .woocommerce-MyAccount-navigation-link--certificate-request a:hover{
  background: var(--tcr-highlight);
  border-color: var(--tcr-highlight);
  color: #fff;
}

.tcr-container{ display:flex; flex-direction:column; gap:16px; }
.tcr-card{
  background: var(--tcr-bg);
  border: 1px solid var(--tcr-border);
  border-radius: 14px;
  padding: 16px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
  border-top: 4px solid var(--tcr-highlight);
}

/* Tabs */
.tcr-tabs{ display:flex; gap:10px; margin: 8px 0 14px; }
.tcr-tab{
  border: 1px solid rgba(0,0,0,.10);
  background: var(--tcr-highlight-08);
  color: var(--tcr-text);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  cursor:pointer;
  flex:1;
}
.tcr-tab:hover{ background: var(--tcr-highlight-18); }
.tcr-tab.is-active{
  background: var(--tcr-highlight);
  border-color: var(--tcr-highlight);
  color: #fff;
  box-shadow: 0 12px 26px var(--tcr-highlight-24);
}
.tcr-title{ margin:0 0 12px; font-size: 18px; }
.tcr-subtitle{ margin:0 0 12px; font-size: 16px; }
.tcr-form .tcr-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
@media (max-width: 768px){ .tcr-form .tcr-grid{ grid-template-columns: 1fr; } }

.tcr-field input, .tcr-field select{
  width:100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--tcr-border);
  background:#fff;
}
.tcr-field input:focus, .tcr-field select:focus{
  outline:none;
  border-color: color-mix(in srgb, var(--tcr-highlight) 55%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tcr-highlight) 18%, transparent);
}

.tcr-label{ display:block; font-weight: 700; margin-bottom: 6px; }
.tcr-row{ margin-top: 12px; }
.tcr-inline{ display:flex; gap:16px; flex-wrap: wrap; }
.tcr-hint{ color: var(--tcr-muted); display:block; margin-top:6px; font-size: 12px; }
.tcr-price{ padding: 10px 12px; border-radius: 12px; background: #f9fafb; border: 1px dashed var(--tcr-border); }
.tcr-actions{ display:flex; align-items:center; gap:12px; }

.tcr-btn{
  appearance:none;
  border: none;
  background: var(--tcr-highlight);
  color:#fff !important;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  cursor:pointer;
  display:inline-block;
  text-decoration:none;
  line-height: 1.2;
}
.tcr-btn:disabled{ opacity:.6; cursor:not-allowed; }

.tcr-btn, .tcr-btn:visited,
.tcr-btn:hover,
.tcr-btn:focus{
  color: #fff !important;
  text-decoration: none;
}

/* Dashboard boxes (My Account) */
.tcr-dashboard{ margin: 0 0 18px; }
.tcr-dashboard__title{ margin: 0 0 10px; font-size: 18px; font-weight: 900; }
.tcr-dashboard__grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 768px){ .tcr-dashboard__grid{ grid-template-columns: 1fr; } }
.tcr-dashbox{
  background: var(--tcr-dash-bg, var(--tcr-highlight));
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 26px rgba(0,0,0,.10);
}
.tcr-dashboard__grid .tcr-dashbox:nth-child(1){ --tcr-dash-bg:#FFD23F; }
.tcr-dashboard__grid .tcr-dashbox:nth-child(2){ --tcr-dash-bg:#EE4266; }
.tcr-dashboard__grid .tcr-dashbox:nth-child(3){ --tcr-dash-bg:#3BCEAC; }
.tcr-dashbox__label{ color: rgba(255,255,255,.86); font-weight: 900; font-size: 13px; }
.tcr-dashbox__value{ margin-top: 6px; font-size: 30px; font-weight: 950; color: #fff; letter-spacing: .2px; }
.tcr-dashbox__value--status{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcr-dashbox__value--status .tcr-pill{ font-size: 14px; padding: 6px 12px; display:inline-flex; align-items:center; }
.tcr-dashbox__action{ margin-top: 8px; color: rgba(255,255,255,.86); font-size: 12px; }

/* Yellow card needs darker text for contrast */
.tcr-dashboard__grid .tcr-dashbox:nth-child(1) .tcr-dashbox__label,
.tcr-dashboard__grid .tcr-dashbox:nth-child(1) .tcr-dashbox__value,
.tcr-dashboard__grid .tcr-dashbox:nth-child(1) .tcr-dashbox__action,
.tcr-dashboard__grid .tcr-dashbox:nth-child(1) .tcr-link{
  color: #540D6E !important;
}
.tcr-dashboard__grid .tcr-dashbox:nth-child(1) .tcr-link{ text-decoration: underline; }

.tcr-link{ color: var(--tcr-highlight); font-weight: 900; text-decoration:none; }
.tcr-link:hover{ text-decoration: underline; }

/* Profile photo row */
.tcr-profile-row{ display:flex; gap:12px; align-items:center; margin: 10px 0; }
.tcr-profile-avatar img{ width:64px; height:64px; border-radius: 999px; object-fit: cover; border: 3px solid var(--tcr-highlight-18); }
.tcr-profile-meta{ flex:1; }
.tcr-loader{ color: var(--tcr-muted); font-size: 13px; }

.tcr-alert{
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--tcr-border);
  background: #f9fafb;
}
.tcr-alert--success{ border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.08); }
.tcr-alert--warning{ border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.08); }
.tcr-alert--danger{ border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.08); }

.tcr-muted{ color: var(--tcr-muted); }

.tcr-table-wrap{ overflow:auto; }
.tcr-table{ width:100%; border-collapse: collapse; }
.tcr-table th, .tcr-table td{ padding: 10px 10px; border-bottom: 1px solid var(--tcr-border); text-align: right; font-size: 14px; }
.tcr-table th{ background:#f9fafb; font-weight: 800; }

.tcr-pill{
  display:inline-block; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--tcr-border); font-size: 12px; font-weight: 800;
  background:#fff;
}
.tcr-pill--success{ border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.08); }
.tcr-pill--warning{ border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.08); }
.tcr-pill--danger{ border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.08); }
.tcr-pill--muted{ color: var(--tcr-muted); }

.tcr-reject-pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(245,158,11,.35);
  background: rgba(245,158,11,.10);
  font-size: 12px;
}

/* Jalali datepicker (ensure month/year dropdowns are visible) */
.tcr-jdp{
  position:absolute;
  z-index: 99999;
  width: 320px;
  background:#fff;
  border: 1px solid var(--tcr-border);
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(0,0,0,.12);
  padding: 10px;
  display:none;
}
.tcr-jdp.is-open{ display:block; }
.tcr-jdp__head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom: 8px; }
.tcr-jdp__title{ display:flex; align-items:center; justify-content:center; gap:8px; flex:1; }
.tcr-jdp__select{
  display:inline-block;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-weight: 800;
  color: var(--tcr-text);
  min-width: 120px;
}
.tcr-jdp__select--year{ min-width: 110px; }
.tcr-jdp__nav{
  border: none;
  background: var(--tcr-highlight-12);
  color: var(--tcr-highlight);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-weight: 900;
  cursor:pointer;
}
.tcr-jdp__nav:hover{ background: var(--tcr-highlight-18); }
.tcr-jdp__grid{ display:flex; flex-direction:column; gap: 6px; }
.tcr-jdp__dow, .tcr-jdp__days{ display:grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tcr-jdp__cell{ text-align:center; }
.tcr-jdp__cell--dow{ font-size: 12px; font-weight: 900; color: var(--tcr-muted); padding: 4px 0; }
.tcr-jdp__cell--empty{ height: 34px; }
.tcr-jdp__cell--day{
  border: 1px solid rgba(0,0,0,.10);
  background:#fff;
  height: 34px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 800;
}
.tcr-jdp__cell--day:hover{ background: var(--tcr-highlight-08); border-color: var(--tcr-highlight-34); }
.tcr-jdp__cell--day.is-selected{ background: var(--tcr-highlight); border-color: var(--tcr-highlight); color:#fff; }
.tcr-jdp__cell--day.is-today{ box-shadow: 0 0 0 3px var(--tcr-highlight-12); }
