/* Header Account Dropdown (Astra) */
.ast-header-account.cottonia-header-account{ position: relative; }

.cottonia-account-dd{
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;

  min-width: 210px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0,0,0,.12);
  z-index: 99999;

  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}

.ast-header-account.cottonia-header-account.is-open .cottonia-account-dd{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

html[dir='rtl'] .cottonia-account-dd{
  right: auto;
  left: 0;
}

.cottonia-account-dd-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.cottonia-account-dd-list a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);

  font-weight: 900;
  font-size: 13px;
  color: rgba(0,0,0,.88) !important;
  text-decoration: none !important;

  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.cottonia-account-dd-list a:hover{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.18);
  transform: translateY(-1px);
}

.cottonia-account-dd-list a:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,0,0,.08);
}

/* Make it usable on very small headers */
@media (max-width: 480px){
  .cottonia-account-dd{ min-width: 190px; }
}

/* Global toast */
.cottonia-toast-wrap{
  position:fixed;
  inset-inline-end:18px;
  bottom:18px;
  z-index:100000;
  display:grid;
  gap:10px;
  max-width:min(92vw, 380px);
}
.cottonia-toast{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  background:#111;
  color:#fff;
  box-shadow:0 18px 45px rgba(0,0,0,.24);
}
.cottonia-toast__msg{flex:1 1 auto;font-size:13px;line-height:1.45;}
.cottonia-toast__action,
.cottonia-toast__action:visited{color:#fff !important;text-decoration:underline !important;font-weight:700;}
.cottonia-toast__close{
  border:0;background:transparent;color:#fff;cursor:pointer;font-size:20px;line-height:1;padding:0;
}

/* Auth modal */
body.cottonia-auth-modal-open{overflow:hidden;}
.cottonia-auth-modal[hidden]{display:none !important;}
.cottonia-auth-modal{
  position:fixed;
  inset:0;
  z-index:100001;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.cottonia-auth-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(17,24,39,.54);
  backdrop-filter:blur(4px);
}
.cottonia-auth-modal__dialog{
  position:relative;
  z-index:1;
  width:min(100%, 560px);
}
body.page-template-default .cottonia-aui-wrap .cottonia-auth-card,
body.woocommerce-account .cottonia-aui-wrap .cottonia-auth-card,
body[class*="page"] .cottonia-aui-wrap .cottonia-auth-card{
  width:min(100%, 460px);
}
.cottonia-auth-modal__close{
  position:absolute;
  top:18px;
  inset-inline-end:18px;
  width:auto !important;height:auto !important;
  border:none !important;
  outline:none !important;
  background:none !important;
  box-shadow:none !important;
  color:#111827;
  cursor:pointer;
  font-size:28px;
  font-weight:400;
  line-height:1;
  padding:0 !important;
  min-height:0 !important;
}
.cottonia-auth-modal__close:hover{transform:scale(1.06);}

/* Shared auth card look for page + modal */
.cottonia-auth-card{
  width:min(100%, 460px);
  margin:28px auto 0;
  padding:24px;
  border-radius:28px;
  background:#fff;
  box-shadow:0 20px 55px rgba(15,23,42,.10);
  border:1px solid rgba(15,23,42,.06);
}
.cottonia-auth-card--modal{
  width:100%;
  max-width:none;
  margin:0;
  padding:32px 28px 28px;
  border-radius:32px;
  box-shadow:0 28px 80px rgba(15,23,42,.18);
}
.cottonia-auth-title{margin:0 0 14px;text-align:center;font-size:22px;line-height:1.25;font-weight:800;}
.cottonia-auth-tabs{display:flex;justify-content:center;align-items:center;gap:10px;margin:0 0 20px;flex-wrap:wrap;}
.cottonia-tab{appearance:none;-webkit-appearance:none;border:1px solid rgba(0,0,0,.10);background:#f7f7f8;color:rgba(0,0,0,.78);border-radius:999px;padding:11px 16px;font-weight:800;font-size:13px;line-height:1;cursor:pointer;user-select:none;text-align:center;flex:1 1 140px;max-width:200px;transition:background .15s ease,border-color .15s ease,transform .12s ease,color .15s ease, box-shadow .15s ease;}
.cottonia-tab:hover{background:#fff;border-color:rgba(0,0,0,.18);transform:translateY(-1px);}
.cottonia-tab.active{background:#fff;color:rgba(0,0,0,.92);border-color:rgba(0,0,0,.16);box-shadow:0 8px 20px rgba(15,23,42,.06);}
.cottonia-auth-card form{display:grid;gap:14px;}
.cottonia-auth-card .form-row{margin:0 !important;}
.cottonia-auth-card label{font-size:12px;font-weight:800;margin-bottom:6px;display:block;color:#111827;}
.cottonia-auth-card .input-text{width:100%;height:48px;border-radius:16px;padding:12px 14px;font-size:14px;border:1px solid rgba(0,0,0,.12);background:#fff;box-shadow:none;}
.cottonia-auth-card .input-text:focus{outline:none;border-color:rgba(0,0,0,.22);box-shadow:0 0 0 4px rgba(15,23,42,.06);}
.cottonia-auth-card .cottonia-actions{display:flex;gap:8px;justify-content:center;margin-top:4px;flex-wrap:wrap;}
.cottonia-auth-card .cottonia-actions .button{width:100%;min-width:0;padding:13px 18px !important;font-weight:900;border-radius:16px !important;min-height:48px;position:relative;}
.cottonia-auth-card .cottonia-actions .button[disabled]{opacity:.92;cursor:wait;}
.cottonia-auth-card .cottonia-actions .button[disabled]::after{content:"";width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-inline-end-color:transparent;display:inline-block;vertical-align:-2px;margin-inline-start:8px;animation:cottonia-auth-spin .7s linear infinite;}
@keyframes cottonia-auth-spin{to{transform:rotate(360deg);}}
.cottonia-auth-card .cottonia-alert{display:block;width:100%;box-sizing:border-box;text-align:center;font-size:13px;line-height:1.55;border-radius:16px;padding:12px 14px;border:1px solid rgba(220,38,38,.25);background:rgba(220,38,38,.06);color:rgba(153,27,27,.95);}
.cottonia-auth-card .cottonia-alert.is-success{border-color:rgba(6,118,71,.25);background:rgba(6,118,71,.07);color:#067647;}
.cottonia-auth-card .cottonia-auth-status{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:100%;min-height:42px;padding:10px 14px;margin:10px 0 14px;border-radius:16px;text-align:center;font-size:13px;font-weight:800;line-height:1.45;border:1px solid rgba(15,23,42,.10);background:rgba(15,23,42,.04);color:rgba(15,23,42,.86);box-sizing:border-box;}
.cottonia-auth-card .cottonia-auth-status[hidden]{display:none !important;}
.cottonia-auth-card .cottonia-auth-status::before{content:"";width:8px;height:8px;border-radius:999px;background:currentColor;flex:0 0 auto;opacity:.75;}
.cottonia-auth-card .cottonia-auth-status.is-loading{border-color:rgba(180,83,9,.18);background:rgba(245,158,11,.12);color:rgba(146,64,14,.95);}
.cottonia-auth-card .cottonia-auth-status.is-success{border-color:rgba(5,150,105,.20);background:rgba(16,185,129,.12);color:rgba(4,120,87,.96);}
.cottonia-auth-card .cottonia-auth-status.is-error{border-color:rgba(220,38,38,.22);background:rgba(220,38,38,.08);color:rgba(153,27,27,.96);}

.cottonia-auth-extra-link{text-align:center;font-size:13px;margin-top:2px;}
.cottonia-auth-extra-link a{text-decoration:none !important;}
.cottonia-auth-captcha{display:flex;justify-content:center;overflow:hidden;padding-top:2px;}
.cottonia-auth-captcha__widget{min-height:70px;}

@media (max-width: 480px){
  .cottonia-auth-modal{padding:14px;}
  .cottonia-auth-modal__dialog{width:min(100%, 430px);}
  .cottonia-auth-card{width:100%;padding:18px;border-radius:22px;}
  .cottonia-auth-card--modal{padding:20px 18px 18px;border-radius:24px;}
  .cottonia-auth-modal__close{top:14px;inset-inline-end:14px;}
  .cottonia-auth-tabs{gap:8px;}
  .cottonia-tab{flex:1 1 0;max-width:none;padding:10px 12px;}
  .cottonia-toast-wrap{inset-inline:10px;bottom:10px;max-width:none;}
}

.cottonia-auth-card [data-cottonia-panel][hidden]{display:none !important;}
.cottonia-auth-modal__close::before,.cottonia-auth-modal__close::after{box-shadow:none !important;}


/* Track order tab + checkout guest prompt */
.cottonia-track-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:2px 0 6px;}
.cottonia-track-mode{appearance:none;-webkit-appearance:none;border:1px solid rgba(0,0,0,.10);background:#f7f7f8 !important;color:rgba(0,0,0,.78) !important;border-radius:999px;padding:11px 16px;font-size:13px;font-weight:800;cursor:pointer;line-height:1;min-height:44px;text-align:center;transition:background .15s ease,border-color .15s ease,transform .12s ease,color .15s ease, box-shadow .15s ease;}
.cottonia-track-mode:hover{background:#fff !important;border-color:rgba(0,0,0,.18);color:rgba(0,0,0,.92) !important;transform:translateY(-1px);}
.cottonia-track-mode.is-active{background:#fff !important;color:rgba(0,0,0,.92) !important;border-color:rgba(0,0,0,.16);box-shadow:0 8px 20px rgba(15,23,42,.06);}
.cottonia-checkout-auth-links{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;width:100%;}
.cottonia-checkout-auth-links a{text-decoration:none !important;font-weight:700;}
.cottonia-guest-checkout-modal[hidden]{display:none !important;}
.cottonia-guest-checkout-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:18px;}
.cottonia-guest-checkout-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(4px);}
.cottonia-guest-checkout-modal__dialog{position:relative;z-index:1;width:min(100%,430px);background:#fff;border-radius:28px;padding:26px 22px 22px;box-shadow:0 20px 60px rgba(15,23,42,.22);text-align:center;}
.cottonia-guest-checkout-modal__close{position:absolute;top:12px;inset-inline-end:12px;border:none;background:transparent;font-size:28px;line-height:1;cursor:pointer;padding:6px;color:#111827;}
.cottonia-guest-checkout-modal__title{font-size:22px;font-weight:800;line-height:1.3;margin:0 0 10px;}
.cottonia-guest-checkout-modal__text{font-size:14px;line-height:1.7;color:rgba(17,24,39,.78);margin:0 0 18px;}
.cottonia-guest-checkout-modal__actions{display:grid;gap:10px;}
.cottonia-guest-checkout-modal__actions .button{width:100%;justify-content:center;}

.cottonia-order-access-card__badge{display:inline-flex;align-items:center;justify-content:center;margin:0 auto 10px;padding:6px 12px;border-radius:999px;background:rgba(15,23,42,.06);font-size:12px;font-weight:800;color:rgba(15,23,42,.78);}
.cottonia-order-access-callout__sub{text-align:center;font-size:13px;line-height:1.65;color:rgba(0,0,0,.66);margin-top:-4px;}
.cottonia-order-access-callout [data-cottonia-claim-order-alert]{margin-top:2px;}

.cottonia-auth-card{margin-bottom:24px;}
