/* Enwebs Suite Pro - login forms and modals on the site. Colors, radius and font follow EnLogin Variants. */
.ewl-scope {
    --ewl-primary: #4f46e5;
    --ewl-btn-text: #fff;
    --ewl-radius: 14px;
    --ewl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ewl-bg: #fff;
    --ewl-text: #0f172a;
    --ewl-muted: #64748b;
    --ewl-border: #e2e8f0;
    --ewl-input: #fff;
    --ewl-r: calc(var(--ewl-radius) * .6);
}
.ewl-scope, .ewl-scope * { box-sizing: border-box; }

/* ------------------------------------------------------------------ Buttons and triggers */
.ewl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 20px;
    font: 600 15px/1.2 var(--ewl-font);
    color: var(--ewl-btn-text) !important;
    background: var(--ewl-primary);
    border: 0; border-radius: var(--ewl-r);
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--ewl-primary) 80%, transparent);
    transition: filter .15s, transform .15s;
}
.ewl-btn:hover { filter: brightness(.94); transform: translateY(-1px); }
.ewl-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--ewl-primary) 40%, transparent); outline-offset: 2px; }
.ewl-btn-block { width: 100%; }
.ewl-btn-light { background: color-mix(in srgb, var(--ewl-primary) 10%, #fff); color: var(--ewl-primary) !important; box-shadow: none; }
.ewl-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.ewl-btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--ewl-btn-text); border-right-color: transparent; border-radius: 50%; animation: ewl-spin .7s linear infinite; }
@keyframes ewl-spin { to { transform: rotate(360deg); } }
.ewl-link { color: var(--ewl-primary); font-family: var(--ewl-font); font-weight: 600; text-decoration: none; cursor: pointer; }
.ewl-link:hover { text-decoration: underline; }
.ewl-ico { width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ewl-ico) center / contain no-repeat; mask: var(--ewl-ico) center / contain no-repeat; }
.ewl-ico-login, .ewl-ico-account { --ewl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3'/%3E%3C/svg%3E"); }
.ewl-ico-register { --ewl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M22 11h-6'/%3E%3C/svg%3E"); }
.ewl-ico-lostpassword { --ewl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='M21 2l-9.6 9.6M15.5 7.5l3 3L22 7l-3-3'/%3E%3C/svg%3E"); }
.ewl-ico-logout { --ewl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
.ewl-user { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ewl-font); }
.ewl-user img { border-radius: 50%; }
.ewl-user a { color: var(--ewl-primary); font-weight: 600; }

/* ------------------------------------------------------------------ Form views */
.ewl-views { font-family: var(--ewl-font); color: var(--ewl-text); font-size: 15px; line-height: 1.5; text-align: left; }
.ewl-view { display: none; }
.ewl-view.is-active { display: block; animation: ewl-in .25s ease; }
@keyframes ewl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ewl-head { text-align: center; margin: 0 0 20px; }
.ewl-head h3 { margin: 0 0 6px; font: 700 23px/1.25 var(--ewl-font); letter-spacing: -.02em; color: var(--ewl-text); }
.ewl-head p { margin: 0; color: var(--ewl-muted); font-size: 14.5px; }
.ewl-logo-wrap { text-align: center; margin: 0 0 16px; }
.ewl-logo { display: inline-block; max-width: 100%; height: auto; }
.ewl-logo-text { font: 800 22px/1.2 var(--ewl-font); color: var(--ewl-text); }
.ewl-form { margin: 0; }
.ewl-field { display: block; margin: 0 0 14px; }
.ewl-field > span:first-child { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ewl-text); }
.ewl-views input[type="text"], .ewl-views input[type="email"], .ewl-views input[type="password"] {
    display: block; width: 100%; min-height: 46px; margin: 0; padding: 10px 14px;
    font: 15px/1.4 var(--ewl-font); color: var(--ewl-text);
    background: var(--ewl-input); border: 1px solid var(--ewl-border); border-radius: var(--ewl-r);
    box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.ewl-views input:focus { outline: none; border-color: var(--ewl-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ewl-primary) 22%, transparent); }
.ewl-pass { position: relative; display: block; }
.ewl-pass input { padding-right: 46px !important; }
.ewl-eye { position: absolute; top: 0; right: 0; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; color: var(--ewl-muted); }
.ewl-eye::before { content: ""; position: absolute; inset: 13px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat; }
.ewl-eye.is-on { color: var(--ewl-primary); }
.ewl-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13.5px; }
.ewl-check { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px; font-size: 13.5px; color: var(--ewl-text); cursor: pointer; }
.ewl-row .ewl-check { margin: 0; }
.ewl-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ewl-primary); }
.ewl-views a { color: var(--ewl-primary); text-decoration: none; font-weight: 600; }
.ewl-views a:hover { text-decoration: underline; }
.ewl-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 14px; color: var(--ewl-muted); text-align: center; }
.ewl-foot [hidden] { display: none; }
.ewl-note { margin: 0 0 14px; font-size: 13px; color: var(--ewl-muted); }
.ewl-msg:empty { display: none; }
.ewl-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--ewl-r); font-size: 13.5px; }
.ewl-msg.is-error { background: #fef2f2; color: #991b1b; border-left: 3px solid #dc2626; }
.ewl-msg.is-ok { background: #ecfdf5; color: #065f46; border-left: 3px solid #10b981; }
.ewl-captcha { margin: 0 0 14px; min-height: 0; }
.ewl-social { display: grid; gap: 10px; }
.ewl-social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--ewl-border); border-radius: var(--ewl-r); background: var(--ewl-input); color: var(--ewl-text) !important; font-weight: 600; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.ewl-social-btn:hover { border-color: var(--ewl-primary); transform: translateY(-1px); }
.ewl-social-btn svg { width: 20px; height: 20px; flex: none; }
.ewl-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--ewl-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.ewl-divider::before, .ewl-divider::after { content: ""; flex: 1; height: 1px; background: var(--ewl-border); }
.ewl-otp { font-size: 24px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.ewl-2fa-icon, .ewl-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin: 0 0 10px; font-size: 26px; border-radius: 16px; background: color-mix(in srgb, var(--ewl-primary) 12%, transparent); }
.ewl-done, .ewl-account { text-align: center; padding: 10px 0; }
.ewl-done h3, .ewl-account h3 { margin: 4px 0 6px; font: 700 21px/1.3 var(--ewl-font); color: var(--ewl-text); }
.ewl-done p, .ewl-account p { margin: 0 0 18px; color: var(--ewl-muted); }
.ewl-account img { border-radius: 50%; }
.ewl-account-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Inline forms [enlogin_form] */
.ewl-inline { width: 100%; margin: 0 auto; }
.ewl-inline-card { padding: 30px; background: var(--ewl-bg); border: 1px solid var(--ewl-border); border-radius: var(--ewl-radius); box-shadow: 0 20px 50px -24px rgba(15, 23, 42, .35); }
.ewl-inline-plain { padding: 0; }
.ewl-inline-glass { padding: 30px; border-radius: var(--ewl-radius); background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); --ewl-text: #fff; --ewl-muted: rgba(255, 255, 255, .8); --ewl-input: rgba(255, 255, 255, .92); }
.ewl-inline-glass input { color: #0f172a !important; }
.ewl-inline-dark { padding: 30px; border-radius: var(--ewl-radius); background: #111827; --ewl-text: #f1f5f9; --ewl-muted: #94a3b8; --ewl-border: #263247; --ewl-input: #0b1222; }

/* ------------------------------------------------------------------ Modal */
html.ewl-lock, html.ewl-lock body { overflow: hidden; }
.ewl-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ewl-modal[hidden] { display: none; }
.ewl-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .22s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ewl-dialog { position: relative; display: flex; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--ewl-bg); border-radius: calc(var(--ewl-radius) * 1.3); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .22s ease, transform .22s ease; }
.ewl-modal.is-open .ewl-backdrop { opacity: 1; }
.ewl-modal.is-open .ewl-dialog { opacity: 1; transform: none; }
.ewl-body { flex: 1; min-width: 0; padding: 36px 32px 30px; }
.ewl-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ewl-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.ewl-close:hover { background: rgba(100, 116, 139, .12); color: var(--ewl-text); }
.ewl-brand { display: none; }

/* Side drawer */
.ewl-modal-drawer { justify-content: flex-end; padding: 0; }
.ewl-modal-drawer .ewl-dialog { height: 100%; max-height: none; max-width: 440px; border-radius: 0; transform: translateX(40px); }
.ewl-modal-drawer .ewl-body { display: flex; flex-direction: column; justify-content: center; padding: 40px 36px; }

/* Bottom sheet */
.ewl-modal-sheet { align-items: flex-end; padding: 0; }
.ewl-modal-sheet .ewl-dialog { max-width: 560px; max-height: 92vh; border-radius: calc(var(--ewl-radius) * 1.6) calc(var(--ewl-radius) * 1.6) 0 0; transform: translateY(60px); }
.ewl-modal-sheet .ewl-dialog::before { content: ""; position: absolute; top: 9px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: #cbd5e1; }

/* Split with brand panel */
.ewl-modal-split .ewl-dialog { max-width: 860px; }
.ewl-modal-split .ewl-brand { display: flex; flex: 0 0 44%; padding: 36px; color: #fff; background: var(--ewl-brand-image, none) center / cover, linear-gradient(150deg, var(--ewl-primary), color-mix(in srgb, var(--ewl-primary) 45%, #0f172a)); position: relative; }
.ewl-modal-split .ewl-brand[style] { background-image: linear-gradient(rgba(15, 23, 42, .45), rgba(15, 23, 42, .65)), var(--ewl-brand-image); }
.ewl-brand-inner { margin-top: auto; }
.ewl-brand h3 { margin: 0 0 10px; color: #fff; font: 800 28px/1.15 var(--ewl-font); letter-spacing: -.02em; }
.ewl-brand p { margin: 0; color: rgba(255, 255, 255, .85); font: 15px/1.6 var(--ewl-font); }

/* Glass */
.ewl-modal-glass .ewl-backdrop { background: radial-gradient(at 20% 20%, color-mix(in srgb, var(--ewl-primary) 70%, transparent), transparent 55%), radial-gradient(at 80% 80%, rgba(236, 72, 153, .55), transparent 55%), rgba(15, 23, 42, .6); }
.ewl-modal-glass .ewl-dialog { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); --ewl-text: #fff; --ewl-muted: rgba(255, 255, 255, .8); --ewl-input: rgba(255, 255, 255, .94); --ewl-border: rgba(255, 255, 255, .35); }
.ewl-modal-glass .ewl-views input { color: #0f172a; }
.ewl-modal-glass .ewl-views a { color: #fff; }
.ewl-modal-glass .ewl-social-btn { color: #0f172a !important; }
.ewl-modal-glass .ewl-close { color: #fff; }

/* Minimal */
.ewl-modal-minimal .ewl-backdrop { background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ewl-modal-minimal .ewl-dialog { background: transparent; box-shadow: none; }
.ewl-modal-minimal .ewl-views input[type="text"], .ewl-modal-minimal .ewl-views input[type="email"], .ewl-modal-minimal .ewl-views input[type="password"] { border-width: 0 0 2px; border-radius: 0; background: transparent; padding-left: 2px; }
.ewl-modal-minimal .ewl-views input:focus { box-shadow: 0 2px 0 0 var(--ewl-primary); }

@media (max-width: 720px) {
    .ewl-modal-split .ewl-brand { display: none; }
    .ewl-body { padding: 32px 22px 24px; }
    .ewl-modal-classic, .ewl-modal-glass { align-items: flex-end; padding: 0; }
    .ewl-modal-classic .ewl-dialog, .ewl-modal-glass .ewl-dialog { border-radius: calc(var(--ewl-radius) * 1.4) calc(var(--ewl-radius) * 1.4) 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ewl-dialog, .ewl-backdrop, .ewl-view.is-active { transition: none; animation: none; }
}

/* Custom registration fields in modals and shortcodes */
.ewl-scope .enwebs-reg-modal { display: flex; flex-wrap: wrap; gap: 0 12px; }
.ewl-scope .enwebs-reg-modal > * { flex: 1 1 100%; }
.ewl-scope .enwebs-reg-modal > .is-half { flex: 1 1 calc(50% - 6px); min-width: 120px; }
.ewl-views select, .ewl-views textarea, .ewl-views input[type="tel"], .ewl-views input[type="number"], .ewl-views input[type="url"], .ewl-views input[type="date"] {
    display: block; width: 100%; min-height: 46px; margin: 0; padding: 10px 14px;
    font: 15px/1.4 var(--ewl-font); color: var(--ewl-text);
    background: var(--ewl-input); border: 1px solid var(--ewl-border); border-radius: var(--ewl-r); box-shadow: none;
}
.ewl-views textarea { min-height: 90px; }
.ewl-views select:focus, .ewl-views textarea:focus { outline: none; border-color: var(--ewl-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ewl-primary) 22%, transparent); }
.ewl-scope .enwebs-reg-radios { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ewl-scope .enwebs-reg-radios label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.ewl-scope .enwebs-reg-check a { text-decoration: underline; }
.ewl-scope .enwebs-reg-help { display: block; margin: -8px 0 14px; font-size: 12px; color: var(--ewl-muted); }
.ewl-scope .enwebs-req { color: #dc2626; }

/* ------------------------------------------------------------------ Trigger button designs */
.ewl-trigger { --tb-bg: var(--ewl-primary); --tb-text: var(--ewl-btn-text); }
.ewl-size-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
.ewl-size-lg { min-height: 54px; padding: 14px 28px; font-size: 17px; }
.ewl-size-lg .ewl-ico { width: 20px; height: 20px; }

.ewl-trigger.ewl-btn-outline { background: transparent; color: var(--ewl-primary) !important; box-shadow: inset 0 0 0 2px var(--ewl-primary); }
.ewl-trigger.ewl-btn-outline:hover { background: var(--ewl-primary); color: var(--ewl-btn-text) !important; filter: none; }
.ewl-trigger.ewl-btn-soft { background: color-mix(in srgb, var(--ewl-primary) 13%, #fff); color: var(--ewl-primary) !important; box-shadow: none; }
.ewl-trigger.ewl-btn-soft:hover { background: color-mix(in srgb, var(--ewl-primary) 22%, #fff); filter: none; }
.ewl-trigger.ewl-btn-gradient { background: linear-gradient(135deg, var(--ewl-primary), color-mix(in srgb, var(--ewl-primary) 45%, #ec4899) 60%, #f59e0b); background-size: 160% 160%; transition: background-position .4s, transform .15s; }
.ewl-trigger.ewl-btn-gradient:hover { background-position: 100% 50%; filter: none; }
.ewl-trigger.ewl-btn-pill { border-radius: 999px; padding-left: 26px; padding-right: 26px; }
.ewl-trigger.ewl-btn-glass { background: rgba(255, 255, 255, .18); color: inherit !important; border: 1px solid rgba(255, 255, 255, .45); box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ewl-trigger.ewl-btn-glow { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ewl-primary) 60%, transparent), 0 10px 30px -6px color-mix(in srgb, var(--ewl-primary) 85%, transparent); animation: ewl-glow 2.4s ease-in-out infinite; }
@keyframes ewl-glow { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--ewl-primary) 0%, transparent), 0 10px 30px -6px color-mix(in srgb, var(--ewl-primary) 85%, transparent); } }
.ewl-trigger.ewl-btn-raised { box-shadow: 0 5px 0 color-mix(in srgb, var(--ewl-primary) 60%, #000), 0 10px 18px -8px rgba(0, 0, 0, .45); transform: translateY(-2px); }
.ewl-trigger.ewl-btn-raised:hover { transform: translateY(-3px); filter: brightness(1.04); }
.ewl-trigger.ewl-btn-raised:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ewl-primary) 60%, #000); }
.ewl-trigger.ewl-btn-brutal { border-radius: 4px; border: 2px solid #111; box-shadow: 4px 4px 0 #111; font-weight: 800; }
.ewl-trigger.ewl-btn-brutal:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #111; filter: none; }
.ewl-trigger.ewl-btn-minimal { background: none; box-shadow: none; padding-left: 2px; padding-right: 2px; border-radius: 0; color: var(--ewl-primary) !important; background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s; }
.ewl-trigger.ewl-btn-minimal:hover { background-size: 100% 2px; transform: none; filter: none; }

/* Custom design: values come from the Forms & modals tab */
.ewl-trigger.ewl-btn-custom { background: var(--cb-bg, var(--ewl-primary)); color: var(--cb-text, #fff) !important; border: var(--cb-bw, 0px) solid var(--cb-border, transparent); border-radius: var(--cb-radius, var(--ewl-r)); box-shadow: var(--cb-shadow, none); }
.ewl-trigger.ewl-btn-custom.ewl-hover-lift:hover { transform: translateY(-3px); filter: none; }
.ewl-trigger.ewl-btn-custom.ewl-hover-grow:hover { transform: scale(1.05); filter: none; }
.ewl-trigger.ewl-btn-custom.ewl-hover-darken:hover { transform: none; filter: brightness(.88); }
.ewl-trigger.ewl-btn-custom.ewl-hover-invert:hover { transform: none; filter: none; background: var(--cb-text, #fff); color: var(--cb-bg, var(--ewl-primary)) !important; }
@media (prefers-reduced-motion: reduce) { .ewl-trigger.ewl-btn-glow { animation: none; } }
