/* StoreMaster login & register */
.sma {
	--sma-accent: var(--sm-accent, #f26a2e);
	--sma-dark: var(--sm-btn-bg, var(--sm-primary, #141414));
	--sma-dark-text: var(--sm-btn-text, #fff);
	--sma-text: var(--sm-text, #1b1b1b);
	--sma-muted: #7a726a;
	--sma-line: #e7e2dc;
	--sma-soft: var(--sm-surface, #f5f1ec);
	--sma-r: clamp(16px, var(--sm-radius, 18px), 28px);
	--sma-btn-r: var(--sm-btn-radius, 999px);
	max-width: 1040px; margin: 8px auto 48px; color: var(--sma-text); font-size: 15px;
}
.sma *, .sma *::before, .sma *::after { box-sizing: border-box; }
.sma [hidden] { display: none !important; }
.sma-card { display: grid; grid-template-columns: 1fr 1.1fr; background: #fff; border-radius: calc(var(--sma-r) + 6px); box-shadow: 0 30px 70px -40px rgba(20, 14, 8, .45), 0 0 0 1px rgba(0, 0, 0, .04); overflow: hidden; animation: smaIn .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes smaIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Left visual */
.sma-visual { position: relative; padding: 44px 40px; color: #fff; display: flex; align-items: flex-end; min-height: 560px;
	background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--sma-accent) 85%, #fff) 0%, var(--sma-accent) 35%, color-mix(in srgb, var(--sma-accent) 40%, #1a0d05) 100%); }
.sma-visual::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -110px; background: rgba(255, 255, 255, .12); }
.sma-visual::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; left: -70px; top: 40%; background: rgba(255, 255, 255, .08); }
.sma-visual.has-img { background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .72) 100%), var(--sma-img) center / cover no-repeat; }
.sma-visual.has-img::before, .sma-visual.has-img::after { display: none; }
.sma-visual-inner { position: relative; z-index: 1; }
.sma-logo { display: inline-flex; background: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 26px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.sma-logo img { max-height: 40px; width: auto; display: block; }
.sma-visual h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.sma-visual p { margin: 0 0 22px; opacity: .92; line-height: 1.55; }
.sma-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sma-perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.sma-perks svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .22); flex: none; }

/* Right side */
.sma-main { padding: 36px clamp(22px, 4vw, 52px) 30px; display: flex; flex-direction: column; }
.sma-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--sma-soft); border-radius: var(--sma-btn-r); padding: 5px; margin-bottom: 26px; }
.sma-tabs button { position: relative; z-index: 1; border: 0; background: transparent; padding: 11px 10px; font: inherit; font-weight: 700; color: var(--sma-muted); cursor: pointer; border-radius: var(--sma-btn-r); transition: color .25s; }
.sma-tabs button.is-active { color: var(--sma-text); }
.sma-tabs-pill { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); background: #fff; border-radius: var(--sma-btn-r); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .25); transition: transform .35s cubic-bezier(.3, .8, .3, 1); }
.sma-tabs[data-active="register"] .sma-tabs-pill { transform: translateX(100%); }

.sma-panel { animation: smaFade .35s ease both; }
@keyframes smaFade { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.sma-step { animation: smaFade .3s ease both; }
.sma-head { margin-bottom: 20px; }
.sma-head h3 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.02em; line-height: 1.2; }
.sma-head p { margin: 0; color: var(--sma-muted); }

.sma-alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; font-size: 14px; animation: smaShake .35s ease; }
.sma-alert.is-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.sma-alert.is-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; animation: none; }
.sma-alert.is-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; animation: none; }
@keyframes smaShake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.sma-form { display: grid; gap: 16px; margin: 0; }
.sma-field { display: grid; gap: 7px; margin: 0; }
.sma-field label { font-weight: 600; font-size: 14px; }
.sma-req { color: var(--sma-accent); }
.sma .sma-field input, .sma .sma-phone select { width: 100%; height: 52px; border: 1.5px solid var(--sma-line); border-radius: 14px; padding: 0 16px; font: inherit; font-size: 16px; color: var(--sma-text); background: #fff; transition: border-color .2s, box-shadow .2s; margin: 0; box-shadow: none; }
.sma .sma-field input:focus, .sma .sma-phone select:focus { outline: 0; border-color: var(--sma-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sma-accent) 16%, transparent); }
.sma-field.is-bad input { border-color: #ef4444; }
.sma-phone { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.sma .sma-phone select { padding: 0 10px; cursor: pointer; background: var(--sma-soft); font-weight: 600; }
.sma-pass { position: relative; }
.sma .sma-pass input { padding-right: 52px; }
.sma-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--sma-muted); display: grid; place-items: center; padding: 0; }
.sma-eye svg { width: 20px; height: 20px; }
.sma-eye.is-on { color: var(--sma-accent); }

.sma-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border: 0; border-radius: var(--sma-btn-r); background: var(--sma-dark); color: var(--sma-dark-text); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .6); margin: 0; }
.sma-btn:hover { transform: translateY(-1px); background: var(--sma-accent); color: #fff; box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--sma-accent) 70%, transparent); }
.sma-btn:active { transform: scale(.98); }
.sma-btn:disabled { opacity: .75; cursor: progress; transform: none; }
.sma-btn.is-busy::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: smaSpin .7s linear infinite; }
@keyframes smaSpin { to { transform: rotate(360deg); } }

.sma-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--sma-accent); cursor: pointer; text-decoration: none; }
.sma-link:hover { text-decoration: underline; }
.sma-link:disabled { color: var(--sma-muted); cursor: default; text-decoration: none; }
.sma-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sma-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: var(--sma-muted); margin: 0; }
.sma-check input { width: 18px; height: 18px; accent-color: var(--sma-accent); margin: 0; }

.sma-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--sma-line); }
.sma-switch button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 4px 12px; color: var(--sma-muted); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.sma-switch button.is-active { color: var(--sma-text); border-bottom-color: var(--sma-accent); }

.sma-chips { display: flex; gap: 8px; margin-bottom: 16px; }
.sma-chip { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1.5px solid var(--sma-line); background: #fff; border-radius: 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--sma-text); transition: border-color .2s, background .2s; }
.sma-chip svg { width: 20px; height: 20px; flex: none; }
.sma-chip[data-channel="whatsapp"] svg { color: #25d366; }
.sma-chip.is-active { border-color: var(--sma-accent); background: color-mix(in srgb, var(--sma-accent) 7%, #fff); }
.sma-chips--big { flex-direction: column; }
.sma-chips--big .sma-chip { justify-content: flex-start; height: auto; padding: 14px 16px; text-align: left; }
.sma-chips--big .sma-chip span { display: grid; gap: 2px; }
.sma-chips--big .sma-chip small { color: var(--sma-muted); font-weight: 500; word-break: break-all; }
.sma-chips--big .sma-chip svg { width: 26px; height: 26px; }
.sma-chips--big + .sma-btn { margin-top: 4px; }

.sma-code { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(6px, 1.5vw, 10px); }
.sma .sma-code input { width: 100%; height: 58px; border: 1.5px solid var(--sma-line); border-radius: 14px; text-align: center; font-size: 24px; font-weight: 700; padding: 0; background: #fff; color: var(--sma-text); margin: 0; transition: border-color .2s, transform .15s; }
.sma .sma-code input:focus { outline: 0; border-color: var(--sma-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sma-accent) 16%, transparent); transform: translateY(-2px); }
.sma-sent { margin: 0; color: var(--sma-muted); font-size: 14px; }
.sma-resend { justify-self: center; font-size: 14px; }
.sma-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; margin: 0 0 14px; font: inherit; font-weight: 600; color: var(--sma-muted); cursor: pointer; }
.sma-back svg { width: 18px; height: 18px; }
.sma-back:hover { color: var(--sma-text); }

.sma-google { display: flex; justify-content: center; min-height: 44px; }
.sma-or { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--sma-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.sma-or::before, .sma-or::after { content: ""; flex: 1; height: 1px; background: var(--sma-line); }

.sma-foot { text-align: center; margin: 22px 0 0; color: var(--sma-muted); }
.sma-legal { margin: auto 0 0; padding-top: 24px; text-align: center; font-size: 12.5px; color: var(--sma-muted); }
.sma-legal a { color: inherit; text-decoration: underline; }

/* Single card (add number) */
.sma--single { max-width: 520px; }
.sma--single .sma-card { grid-template-columns: 1fr; }
.sma--single .sma-main { padding-top: 34px; }
.sma-badge { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; background: color-mix(in srgb, var(--sma-accent) 12%, #fff); margin-bottom: 16px; }

/* Hide WooCommerce's own login/register columns if another plugin prints them too */
.woocommerce-account .sma ~ .u-columns { display: none; }

@media (max-width: 860px) {
	.sma { margin-top: 0; }
	.sma-card { grid-template-columns: 1fr; border-radius: var(--sma-r); }
	.sma-visual { min-height: 0; padding: 26px 24px; }
	.sma-visual h2 { font-size: 22px; margin-bottom: 4px; }
	.sma-visual p { margin-bottom: 0; font-size: 14px; }
	.sma-perks, .sma-logo { display: none; }
	.sma-visual::before { width: 200px; height: 200px; right: -60px; top: -80px; }
	.sma-main { padding: 22px 18px 22px; }
	.sma-head h3 { font-size: 21px; }
}
@media (max-width: 380px) {
	.sma-phone { grid-template-columns: 96px 1fr; }
	.sma .sma-code input { height: 50px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.sma-card, .sma-panel, .sma-step, .sma-alert { animation: none; }
}

/* The card has its own heading – hide the big page title above it (StoreMaster theme). */
body.woocommerce-account:has(.sma) .sm-page-header { display: none; }
body.woocommerce-account:has(.sma) .sm-section { padding-top: clamp(18px, 3vw, 40px); }
