/* Sign-in / sign-up modal (2026-11-27) - see custom/js/wphh-auth-modal.js and includes/auth-modal.tpl.
   Every rule is scoped to .wphh-au so theme, Bootstrap and client-area CSS can't reach it. */
.wphh-au {
    --au-ink: #111827;
    --au-muted: #6b7280;
    --au-line: #d1d5db;
    --au-line-soft: #e5e7eb;
    --au-soft: #f9fafb;
    --au-green: #16a34a;
    --au-green-dark: #15803d;
    --au-green-soft: #f0fdf4;
    --au-red: #dc2626;
    --au-red-soft: #fef2f2;
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--au-ink);
    -webkit-font-smoothing: antialiased;
}
.wphh-au[hidden] { display: none !important; }
.wphh-au *, .wphh-au *::before, .wphh-au *::after { box-sizing: border-box; }
.wphh-au a, .wphh-au button, .wphh-au input, .wphh-au select { min-height: 0; min-width: 0; margin: 0; font-family: inherit; }
.wphh-au :focus-visible { outline: 3px solid rgba(22, 163, 74, 0.4); outline-offset: 2px; }
.wphh-au a:focus:not(:focus-visible), .wphh-au button:focus:not(:focus-visible) { outline: none; }
.wphh-au p, .wphh-au h2, .wphh-au ol, .wphh-au ul { margin: 0; padding: 0; }

.wphh-au .wphh-au-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.wphh-au.is-open .wphh-au-overlay { opacity: 1; }

.wphh-au .wphh-au-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 452px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.28);
    outline: none;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.wphh-au.is-open .wphh-au-dialog { opacity: 1; transform: none; }
.wphh-au .wphh-au-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 30px 32px 26px; border-radius: inherit; scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }
.wphh-au .wphh-au-scroll::-webkit-scrollbar { width: 10px; }
.wphh-au .wphh-au-scroll::-webkit-scrollbar-track { background: transparent; }
.wphh-au .wphh-au-scroll::-webkit-scrollbar-thumb { border: 3px solid #ffffff; border-radius: 10px; background: #d1d5db; }

.wphh-au .wphh-au-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(243, 244, 246, 0.96);
    color: var(--au-ink);
    font-size: 21px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.12);
    transition: background 0.15s ease;
}
.wphh-au .wphh-au-close:hover { background: var(--au-line-soft); }

/* heading */
.wphh-au .wphh-au-head { padding-right: 36px; margin-bottom: 18px; }
.wphh-au .wphh-au-logo { display: block; width: 150px; height: auto; margin-bottom: 18px; }
.wphh-au .wphh-au-title { color: var(--au-ink); font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.wphh-au .wphh-au-sub { margin-top: 6px; color: var(--au-muted); font-size: 15px; line-height: 1.5; }
.wphh-au .wphh-au-sub:empty { display: none; }

/* tabs */
.wphh-au .wphh-au-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 12px; background: #f3f4f6; }
.wphh-au .wphh-au-tabs[hidden] { display: none; }
.wphh-au .wphh-au-tab {
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--au-muted);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.wphh-au .wphh-au-tab[aria-selected="true"] { background: #ffffff; color: var(--au-ink); box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12); }

/* fields */
.wphh-au .wphh-au-view[hidden], .wphh-au .wphh-au-step[hidden] { display: none; }
.wphh-au .wphh-au-field { margin-bottom: 15px; }
.wphh-au .wphh-au-field label, .wphh-au .wphh-au-label-row label {
    display: block;
    margin-bottom: 6px;
    color: var(--au-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.wphh-au .wphh-au-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wphh-au .wphh-au-opt { color: var(--au-muted); font-size: 12.5px; font-weight: 500; }
.wphh-au input[type="email"], .wphh-au input[type="password"], .wphh-au input[type="text"], .wphh-au input[type="tel"],
.wphh-au input:not([type]), .wphh-au select {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--au-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--au-ink);
    font-size: 16px;
    line-height: 1.2;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.wphh-au select {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
.wphh-au input:hover, .wphh-au select:hover { border-color: #9ca3af; }
.wphh-au input:focus, .wphh-au select:focus { border-color: var(--au-green); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14); outline: none; }
.wphh-au .is-invalid input, .wphh-au .is-invalid select { border-color: var(--au-red); }
.wphh-au .is-invalid input:focus, .wphh-au .is-invalid select:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
.wphh-au .wphh-au-err { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--au-red); font-size: 13px; font-weight: 500; }
.wphh-au .wphh-au-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wphh-au .wphh-au-row-3 { grid-template-columns: 1.15fr 1fr 0.9fr; }

.wphh-au .wphh-au-pw { position: relative; }
.wphh-au .wphh-au-pw input { padding-right: 50px; }
.wphh-au .wphh-au-eye {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--au-muted);
    font-size: 19px;
    cursor: pointer;
}
.wphh-au .wphh-au-eye:hover { background: #f3f4f6; color: var(--au-ink); }
.wphh-au .wphh-au-caps { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #b45309; font-size: 13px; font-weight: 600; }
.wphh-au .wphh-au-caps[hidden] { display: none; }

.wphh-au .wphh-au-meter { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--au-line-soft); }
.wphh-au .wphh-au-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--au-red); transition: width 0.25s ease, background 0.25s ease; }
.wphh-au .wphh-au-meter.is-ok span { background: #f59e0b; }
.wphh-au .wphh-au-meter.is-strong span { background: var(--au-green); }
.wphh-au .wphh-au-help { margin-top: 6px; color: var(--au-muted); font-size: 13px; line-height: 1.45; }
.wphh-au .wphh-au-meter.is-weak + .wphh-au-help { color: var(--au-red); }
.wphh-au .wphh-au-meter.is-strong + .wphh-au-help { color: var(--au-green-dark); }

.wphh-au .wphh-au-phone { display: flex; gap: 8px; }
.wphh-au .wphh-au-dial { position: relative; flex: 0 0 96px; }
.wphh-au .wphh-au-dial-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 30px 0 14px;
    border: 1.5px solid var(--au-line);
    border-radius: 12px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--au-ink);
    font-size: 16px;
    pointer-events: none;
}
.wphh-au .wphh-au-dial select { position: relative; z-index: 1; height: 48px; opacity: 0; cursor: pointer; }
.wphh-au .wphh-au-dial select:focus + .wphh-au-dial-text, .wphh-au .wphh-au-dial:focus-within .wphh-au-dial-text { border-color: var(--au-green); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14); }
.wphh-au .wphh-au-phone input { flex: 1 1 auto; }

/* checkboxes */
.wphh-au .wphh-au-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 14px; color: var(--au-ink); font-size: 14px; font-weight: 500; line-height: 1.45; cursor: pointer; }
.wphh-au .wphh-au-check[hidden] { display: none; }
.wphh-au .wphh-au-check input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 0;
    border: 1.5px solid #9ca3af;
    border-radius: 6px;
    accent-color: var(--au-green);
    cursor: pointer;
}
.wphh-au .wphh-au-check a { color: var(--au-green-dark) !important; font-weight: 600; text-decoration: underline !important; text-underline-offset: 2px; }
.wphh-au .wphh-au-check.is-invalid { color: var(--au-red); }
.wphh-au .wphh-au-check .wphh-au-err { flex-basis: 100%; }
.wphh-au .wphh-au-check.is-invalid { flex-wrap: wrap; }

/* captcha */
.wphh-au .wphh-au-captcha { min-height: 78px; margin: 4px 0 16px; }
.wphh-au .wphh-au-captcha[hidden] { display: none; }
.wphh-au .wphh-au-captcha-wait { display: flex; align-items: center; gap: 8px; min-height: 78px; padding: 0 14px; border: 1.5px dashed var(--au-line); border-radius: 12px; color: var(--au-muted); font-size: 13.5px; }
.wphh-au .wphh-au-captcha-wait a { color: var(--au-green-dark); font-weight: 600; }

/* buttons */
.wphh-au .wphh-au-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--au-green);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.wphh-au .wphh-au-submit:hover { background: var(--au-green-dark); transform: translateY(-1px); }
.wphh-au .wphh-au-submit[disabled] { cursor: default; transform: none; opacity: 0.85; }
.wphh-au .wphh-au-submit[hidden] { display: none; }
.wphh-au .wphh-au-submit.is-busy span { visibility: hidden; }
.wphh-au .wphh-au-submit.is-busy::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wphh-au-turn 0.7s linear infinite;
}
.wphh-au .wphh-au-actions { display: flex; gap: 10px; }
.wphh-au .wphh-au-actions .wphh-au-submit { flex: 1 1 auto; }
.wphh-au .wphh-au-back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 52px;
    padding: 0 18px;
    border: 1.5px solid var(--au-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--au-ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.wphh-au .wphh-au-back:hover { border-color: #9ca3af; background: var(--au-soft); }
.wphh-au .wphh-au-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--au-green-dark) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
}
.wphh-au .wphh-au-link:hover { text-decoration: underline !important; text-underline-offset: 2px; }
.wphh-au .wphh-au-foot { margin-top: 18px; color: var(--au-muted); font-size: 14px; text-align: center; }
.wphh-au .wphh-au-foot[hidden] { display: none; }
.wphh-au .wphh-au-foot .wphh-au-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }

/* alert */
.wphh-au .wphh-au-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: var(--au-red-soft);
    color: #991b1b;
    font-size: 14px;
    line-height: 1.45;
}
.wphh-au .wphh-au-alert[hidden] { display: none; }
.wphh-au .wphh-au-alert > i { flex: 0 0 auto; margin-top: 1px; color: var(--au-red); font-size: 18px; }
.wphh-au .wphh-au-alert ul { margin: 4px 0 0 18px; list-style: disc; }
.wphh-au .wphh-au-alert li { margin: 2px 0; }
.wphh-au .wphh-au-alert a { color: #991b1b; font-weight: 700; text-decoration: underline; }

/* steps */
.wphh-au .wphh-au-steps { display: flex; gap: 8px; margin-bottom: 18px; list-style: none; }
.wphh-au .wphh-au-steps li {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--au-line-soft);
    color: var(--au-muted);
    font-size: 13.5px;
    font-weight: 600;
}
.wphh-au .wphh-au-steps li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--au-line-soft);
    color: var(--au-muted);
    font-size: 12px;
    font-weight: 700;
}
.wphh-au .wphh-au-steps li.is-on { border-color: var(--au-green); color: var(--au-ink); }
.wphh-au .wphh-au-steps li.is-on span { background: var(--au-green); color: #ffffff; }
.wphh-au .wphh-au-steps li.is-done { border-color: #86efac; color: var(--au-green-dark); }
.wphh-au .wphh-au-steps li.is-done span { background: var(--au-green-soft); color: var(--au-green-dark); }

/* done */
.wphh-au .wphh-au-done { padding: 8px 0 4px; text-align: center; }
.wphh-au .wphh-au-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 50%; background: var(--au-green-soft); color: var(--au-green); font-size: 40px; }
.wphh-au .wphh-au-done-text { margin-bottom: 18px; color: var(--au-muted); font-size: 15px; line-height: 1.55; }

.wphh-au .wphh-au-spin { display: inline-block; animation: wphh-au-turn 0.8s linear infinite; }
@keyframes wphh-au-turn { to { transform: rotate(360deg); } }

/* phones: a sheet that slides up and fills the screen */
@media (max-width: 560px) {
    .wphh-au { align-items: flex-end; padding: 0; }
    .wphh-au .wphh-au-dialog {
        max-width: none;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translateY(40px);
    }
    .wphh-au .wphh-au-scroll { flex: 1 1 auto; padding: 22px 18px calc(24px + env(safe-area-inset-bottom, 0px)); padding-top: calc(22px + env(safe-area-inset-top, 0px)); }
    .wphh-au .wphh-au-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
    .wphh-au .wphh-au-logo { width: 140px; margin-bottom: 16px; }
    .wphh-au .wphh-au-title { font-size: 23px; }
    .wphh-au .wphh-au-row-3 { grid-template-columns: 1fr 1fr; }
    .wphh-au .wphh-au-row-3 .wphh-au-field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 340px) {
    .wphh-au .wphh-au-row { grid-template-columns: 1fr; gap: 0; }
    .wphh-au .wphh-au-captcha > div { transform: scale(0.9); transform-origin: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .wphh-au .wphh-au-overlay, .wphh-au .wphh-au-dialog { transition: none; }
    .wphh-au .wphh-au-spin, .wphh-au .wphh-au-submit.is-busy::after { animation-duration: 1.6s; }
}

/* page behind while the modal is open */
html.wphh-au-lock, html.wphh-au-lock body { overflow: hidden !important; }
html.wphh-au-lock #tidio-chat { display: none !important; }
