/**
 * Accounto Pro Portal - Auth Modal Stylesheet
 * Scoped, Zero Conflict, Bento Apple Edition & RTL
 */

:root {
  --acc-portal-coral: #ff5c7a;
  --acc-portal-coral-dark: #e84b68;
  --acc-portal-coral-soft: rgba(255, 92, 122, 0.14);
}

/* Trigger Stage (کاملاً شفاف و بدون کادر - مستقیم روی بکگراند سایت) */
.accounto-portal-trigger-stage,
.accounto-portal-trigger-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 280px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 auto !important;
  padding: 60px 16px !important;
  box-sizing: border-box !important;
}

/* Coral Site Theme Trigger Button (دکمه رنگ تم سایتم فول دقیق عین کد مادر) */
.accounto-portal-coral-trigger,
.accounto-portal-pill-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #ff5c7a 0%, #e84b68 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 13px 42px !important;
  border-radius: 9999px !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 8px 25px rgba(255, 92, 122, 0.38), 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  outline: none !important;
}

.accounto-portal-coral-trigger:hover,
.accounto-portal-pill-trigger:hover {
  background: linear-gradient(135deg, #ff4769 0%, #d83a57 100%) !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 12px 32px rgba(255, 92, 122, 0.48) !important;
  color: #ffffff !important;
}

.accounto-portal-coral-trigger:active,
.accounto-portal-pill-trigger:active {
  transform: scale(0.96) !important;
}

/* Page Auth Centering on WooCommerce /my-account/ */
.accounto-portal-page-auth-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-height: calc(85vh - 120px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 16px 60px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  background: transparent !important;
}

/* Page Card Specific Styling */
.accounto-portal-page-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  margin: 0 auto !important;
  animation: none !important;
}

/* Ensure Parent Theme Containers are 100% Width and Centered */
body.accounto-portal-active .woocommerce,
body.accounto-portal-active .woocommerce-page,
body.accounto-portal-active .entry-content,
body.accounto-portal-active main#main,
body.accounto-portal-active #primary,
body.accounto-portal-active .site-main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  float: none !important;
}

/* ==========================================================================
   مخفی‌سازی کامل و خودکار هدر و فوتر (WPCode و قالب) در برگه ورود کاربران مهمان
   ========================================================================== */
body.accounto-portal-active.accounto-user-guest #accounto-header,
body.accounto-portal-active.accounto-user-guest header,
body.accounto-portal-active.accounto-user-guest .site-header,
body.accounto-portal-active.accounto-user-guest #masthead,
body.accounto-portal-active.accounto-user-guest [data-elementor-type="header"],
body.accounto-portal-active.accounto-user-guest .ak-header,
body.accounto-portal-active.accounto-user-guest .ak-glass-header,
body.accounto-portal-active.accounto-user-guest .ak-navbar,
body.accounto-portal-active.accounto-user-guest .ak-nav-wrapper,
body.accounto-portal-active.accounto-user-guest .ak-glass-wrapper,
body.accounto-portal-active.accounto-user-guest .ak-glass-footer,
body.accounto-portal-active.accounto-user-guest .ak-blob,
body.accounto-portal-active.accounto-user-guest .ak-top-btn,
body.accounto-portal-active.accounto-user-guest footer,
body.accounto-portal-active.accounto-user-guest .site-footer,
body.accounto-portal-active.accounto-user-guest #colophon,
body.accounto-portal-active.accounto-user-guest [data-elementor-type="footer"],
body.woocommerce-account:not(.logged-in) #accounto-header,
body.woocommerce-account:not(.logged-in) header,
body.woocommerce-account:not(.logged-in) .site-header,
body.woocommerce-account:not(.logged-in) #masthead,
body.woocommerce-account:not(.logged-in) [data-elementor-type="header"],
body.woocommerce-account:not(.logged-in) .ak-header,
body.woocommerce-account:not(.logged-in) .ak-glass-header,
body.woocommerce-account:not(.logged-in) .ak-navbar,
body.woocommerce-account:not(.logged-in) .ak-nav-wrapper,
body.woocommerce-account:not(.logged-in) .ak-glass-wrapper,
body.woocommerce-account:not(.logged-in) .ak-glass-footer,
body.woocommerce-account:not(.logged-in) .ak-blob,
body.woocommerce-account:not(.logged-in) .ak-top-btn,
body.woocommerce-account:not(.logged-in) footer,
body.woocommerce-account:not(.logged-in) .site-footer,
body.woocommerce-account:not(.logged-in) #colophon,
body.woocommerce-account:not(.logged-in) [data-elementor-type="footer"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.accounto-portal-active.accounto-user-guest .accounto-portal-page-auth-wrap,
body.woocommerce-account:not(.logged-in) .accounto-portal-page-auth-wrap {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* General Action Trigger */
.accounto-portal-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff5c7a, #e84b68);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(255, 92, 122, 0.32);
}
.accounto-portal-auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 92, 122, 0.42);
}

/* Modal Root Wrapper */
.accounto-portal-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  direction: rtl;
}

/* Backdrop Blur */
.accounto-portal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 26, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Dialog Card (Apple Bento Aesthetics) */
.accounto-portal-dialog {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 365px;
  background: #ffffff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.8);
  animation: accountoModalEnter 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  color: #1e293b;
  text-align: right;
}

@keyframes accountoModalEnter {
  0% { opacity: 0; transform: scale(0.93) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Close Button (Top Left in RTL) */
.accounto-portal-modal-close {
  position: absolute;
  left: 16px;
  top: 16px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 50%;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.accounto-portal-modal-close:hover {
  background: #f1f5f9;
  color: #334155;
}

/* Header */
.accounto-portal-modal-header {
  text-align: center;
  margin-bottom: 20px;
}
.accounto-portal-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--acc-portal-coral-soft);
  color: var(--acc-portal-coral);
  border-radius: 16px;
  font-weight: 900;
  font-size: 20px;
  margin-bottom: 8px;
}
.accounto-portal-logo-wrap img {
  max-height: 48px;
  max-width: 140px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
}
.accounto-portal-title {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.3;
}
.accounto-portal-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

/* Social Buttons Grid (Google & Telegram) */
.accounto-portal-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.accounto-portal-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155 !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.18s ease;
}
.accounto-portal-google:hover {
  background: #ffffff;
  border-color: var(--acc-portal-coral);
  transform: translateY(-1px);
}
.accounto-portal-telegram {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7 !important;
}
.accounto-portal-telegram:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* Divider */
.accounto-portal-divider {
  position: relative;
  text-align: center;
  margin-bottom: 16px;
}
.accounto-portal-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #e2e8f0;
}
.accounto-portal-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 10px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Switcher Tabs */
.accounto-portal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.portal-tab-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.portal-tab-btn.is-active {
  background: var(--acc-portal-coral);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 92, 122, 0.25);
}

/* Input Fields */
.portal-input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.portal-input-icon {
  position: absolute;
  right: 12px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none;
  color: #94a3b8;
}
.portal-input-icon svg {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  stroke: #94a3b8 !important;
}
.portal-input-group input {
  width: 100% !important;
  height: 44px !important;
  line-height: 44px !important;
  border-radius: 9999px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  padding: 0 40px 0 46px !important;
  font-size: 13.5px !important;
  color: #0f172a !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  direction: ltr !important;
  text-align: left !important;
  box-sizing: border-box !important;
}
.portal-input-group input::placeholder {
  text-align: right;
  color: #94a3b8;
}
.portal-input-group input:focus {
  border-color: var(--acc-portal-coral);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.16);
}
.portal-arrow-btn {
  position: absolute !important;
  left: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background: var(--acc-portal-coral) !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  box-shadow: 0 2px 10px rgba(255, 92, 122, 0.4) !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  z-index: 5 !important;
}
.portal-arrow-btn:hover {
  background: var(--acc-portal-coral-dark) !important;
  transform: translateY(-50%) scale(1.08) !important;
  box-shadow: 0 4px 14px rgba(255, 92, 122, 0.55) !important;
}
.portal-arrow-btn:active {
  transform: translateY(-50%) scale(0.94) !important;
}
.portal-arrow-btn svg {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  stroke: #ffffff !important;
  stroke-width: 2.4px !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
  margin: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.portal-hint {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin: 6px 0 0;
}

/* PIN Boxes */
.portal-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}
.portal-link-btn {
  background: none;
  border: none;
  color: var(--acc-portal-coral);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.portal-pin-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.portal-pin-box {
  width: 44px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}
.portal-pin-box:focus {
  border-color: var(--acc-portal-coral);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.2);
}
.portal-code-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}
.portal-action-btn {
  background: var(--acc-portal-coral);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.portal-action-btn:hover {
  background: var(--acc-portal-coral-dark);
}

/* Toast / Notice */
.portal-notice-box {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.portal-notice-box.is-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Footer Legal - Completely Hidden per User Request */
.accounto-portal-modal-footer {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
