/* ==========================================================================
   pos-auth-glass.css  (claymorphism edition)
   Looping video background + soft, puffy clay surfaces for the login and
   register screens. Self-contained: it replaces pos-auth.css on these pages.
   The file name is unchanged so the Blade views keep working.
   ========================================================================== */

:root {
    /* Brand palette (sampled from the brand sheet) */
    --brand-almond: #b8957f;
    --brand-cafe: #6d3914;
    --brand-caramel: #ab7843;
    --brand-espresso: #4c2b08;
    --brand-mahogany: #35271e;

    /* Clay surfaces: tints and shades of Almond */
    --clay-hi: #f2e6d9;
    --clay-face: #e3d0be;
    --clay-lo: #c8ab94;
    --clay-well: #e8d8c8;
    --clay-text: #35271e;
    --clay-muted: #5c4838;
    --cream: #f6ede1;

    --pp-ink: #1a110b;
    --pp-danger: #9b2c1d;
    --pp-accent: #d9a66b;
    --pp-font: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --pp-display: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;

    /* Reusable clay shadows */
    --clay-card:
        0 44px 80px -24px rgba(18, 10, 5, .75),
        0 20px 34px -14px rgba(18, 10, 5, .5),
        inset 7px 9px 16px rgba(255, 255, 255, .7),
        inset -10px -14px 24px rgba(120, 86, 60, .38);
    --clay-well-shadow:
        inset 5px 5px 11px rgba(110, 78, 52, .3),
        inset -5px -5px 11px rgba(255, 255, 255, .8);
}

/* ---- Shell ------------------------------------------------------------- */
html.pp-auth-lock,
html.pp-auth-lock body {
    height: 100%;
    overflow: hidden;
}

.pp-auth {
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--pp-ink);
    color: var(--clay-text);
    font-family: var(--pp-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pp-auth *,
.pp-auth *::before,
.pp-auth *::after {
    box-sizing: border-box;
}

/* The layouts ship their own form and wizard styles (a grey #eee panel with
   margins, for one). Neutralise them so only this stylesheet decides. */
.pp-auth form,
.pp-auth .pp-form-grid,
.pp-auth .wizard,
.pp-auth .wizard > .content {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

/* ---- Video layer ------------------------------------------------------- */
.pp-video {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--pp-ink);
    pointer-events: none;
}

/* Sits underneath the video; only visible when there is no video or it fails. */
.pp-aurora {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(38% 38% at 18% 28%, rgba(171, 120, 67, .62), transparent 70%),
        radial-gradient(34% 34% at 82% 18%, rgba(184, 149, 127, .38), transparent 70%),
        radial-gradient(44% 44% at 72% 82%, rgba(109, 57, 20, .70), transparent 70%),
        radial-gradient(40% 40% at 14% 86%, rgba(76, 43, 8, .75), transparent 70%);
    filter: blur(34px);
    animation: pp-drift 30s ease-in-out infinite alternate;
    will-change: transform;
}

/* Always visible. Before the first frame arrives it is transparent, so the
   aurora shows through; once frames render, the footage covers it. */
.pp-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Light brown tint so the footage stays visible but text on it stays readable. */
.pp-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(110% 85% at 50% 46%, rgba(26, 16, 10, .08) 0%, rgba(26, 16, 10, .52) 100%),
        linear-gradient(180deg, rgba(31, 20, 13, .46) 0%, rgba(53, 39, 30, .10) 40%, rgba(26, 16, 10, .58) 100%);
}

@keyframes pp-drift {
    from { transform: translate3d(-3%, -2%, 0) scale(1); }
    to   { transform: translate3d(3%, 2%, 0) scale(1.14); }
}

/* ---- Top bar ----------------------------------------------------------- */
.pp-top {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px clamp(18px, 4vw, 48px);
}

.pp-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--cream);
    text-decoration: none;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .5);
}

.pp-mark:hover,
.pp-mark:focus {
    color: var(--cream);
    text-decoration: none;
}

.pp-mark-glyph {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(160deg, #8b4f1f, var(--brand-cafe) 60%, #55290b);
    color: var(--cream);
    box-shadow:
        0 10px 18px -6px rgba(18, 10, 5, .6),
        inset 2px 3px 5px rgba(255, 255, 255, .3),
        inset -3px -4px 7px rgba(30, 15, 3, .45);
    font-family: var(--pp-display);
    font-size: 24px;
    line-height: 1;
    text-shadow: none;
}

.pp-mark-name {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .01em;
}

.pp-top-link {
    color: var(--cream);
    font-size: 14px;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .5);
}

.pp-top .pp-link,
.pp-top .pp-link:visited {
    color: var(--cream);
    text-decoration-color: rgba(246, 237, 225, .55);
}

.pp-top .pp-link:hover {
    color: var(--pp-accent);
}

.pp-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 10px 0 16px;
    border-radius: 999px;
    background: linear-gradient(160deg, var(--clay-hi), var(--clay-lo));
    color: var(--clay-muted);
    box-shadow:
        0 10px 18px -6px rgba(18, 10, 5, .6),
        inset 2px 3px 5px rgba(255, 255, 255, .75),
        inset -3px -4px 7px rgba(120, 86, 60, .32);
}

.pp-lang select {
    height: 100%;
    padding: 0 6px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--clay-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pp-lang select:focus-visible {
    outline: 3px solid var(--brand-caramel);
    outline-offset: 2px;
    border-radius: 999px;
}

.pp-lang option,
.pp-select option {
    color: var(--brand-mahogany);
    background: #f6f0e8;
}

/* ---- Stage ------------------------------------------------------------- */
.pp-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 100px 20px 28px;
}

.pp-card {
    position: relative;
    width: min(100%, 450px);
    margin: auto;
    padding: 42px 38px 32px;
    border-radius: 40px;
    background:
        radial-gradient(130% 80% at 16% 0%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(160deg, var(--clay-hi) 0%, var(--clay-face) 45%, var(--clay-lo) 100%);
    box-shadow: var(--clay-card);
    color: var(--clay-text);
    animation: pp-rise .9s cubic-bezier(.2, .7, .2, 1) both;
}

.pp-card--wide {
    width: min(100%, 800px);
    margin-top: 0;
    margin-bottom: 0;
}

.pp-card--wide + .pp-legal {
    margin-top: 32px;
}

/* One entrance for the whole page; nothing else moves on its own. */
@keyframes pp-rise {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.pp-title {
    margin: 0 0 6px;
    font-family: var(--pp-display);
    font-weight: 400;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -.01em;
    color: var(--brand-mahogany);
}

.pp-sub {
    margin: 0 0 28px;
    color: var(--clay-muted);
    font-size: 15px;
}

/* ---- Fields ------------------------------------------------------------ */
.pp-field {
    margin: 0 0 20px;
}

.pp-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pp-label {
    display: block;
    margin: 0 0 9px 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--brand-mahogany);
}

.pp-input-wrap {
    position: relative;
}

/* Inputs are pressed into the clay like wells. */
.pp-input {
    --ring: 0 0 0 0 transparent;
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    background: var(--clay-well);
    color: var(--clay-text);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--clay-well-shadow), var(--ring);
    transition: box-shadow .2s ease;
}

.pp-input::placeholder {
    color: #85705f;
    opacity: 1;
}

.pp-input:focus {
    --ring: 0 0 0 3px rgba(171, 120, 67, .6);
    outline: 0;
}

.pp-input[readonly] {
    cursor: pointer;
}

.pp-input-wrap .pp-input {
    padding-right: 54px;
}

.pp-select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335271e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
}

/* Keep the clay look when the browser autofills. */
.pp-input:-webkit-autofill,
.pp-input:-webkit-autofill:hover,
.pp-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--clay-text);
    caret-color: var(--clay-text);
    transition: background-color 99999s ease-in-out 0s;
}

.pp-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--clay-muted);
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.pp-toggle:hover {
    color: var(--brand-mahogany);
    background: rgba(53, 39, 30, .08);
}

.pp-toggle:focus-visible {
    outline: 3px solid var(--brand-caramel);
}

.pp-toggle svg {
    width: 21px;
    height: 21px;
}

/* ---- Validation -------------------------------------------------------- */
.pp-input.is-invalid,
.has-error .pp-input {
    --ring: 0 0 0 3px rgba(155, 44, 29, .5);
}

.pp-error,
.pp-auth .help-block {
    display: block;
    margin: 8px 4px 0;
    color: var(--pp-danger);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.pp-error strong {
    font-weight: 600;
}

/* ---- Checkbox ---------------------------------------------------------- */
.pp-check {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0 24px 2px;
    color: var(--clay-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.pp-check input {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    background: var(--clay-well);
    box-shadow:
        inset 3px 3px 7px rgba(110, 78, 52, .32),
        inset -3px -3px 7px rgba(255, 255, 255, .8);
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.pp-check input:checked {
    background-color: var(--brand-cafe);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6ede1' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 15px;
    box-shadow:
        0 5px 9px -3px rgba(53, 39, 30, .55),
        inset 2px 2px 4px rgba(255, 255, 255, .3),
        inset -2px -3px 5px rgba(30, 15, 3, .45);
}

.pp-check input:focus-visible {
    outline: 3px solid var(--brand-caramel);
    outline-offset: 2px;
}

/* ---- Buttons and links ------------------------------------------------- */
.pp-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 30px;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(160deg, #8b4f1f 0%, var(--brand-cafe) 55%, #55290b 100%);
    color: var(--cream);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow:
        0 18px 26px -10px rgba(53, 39, 30, .7),
        0 6px 10px -4px rgba(53, 39, 30, .45),
        inset 3px 4px 7px rgba(255, 255, 255, .3),
        inset -4px -6px 11px rgba(30, 15, 3, .5);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pp-btn--block {
    width: 100%;
}

.pp-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 24px 30px -10px rgba(53, 39, 30, .75),
        0 8px 12px -4px rgba(53, 39, 30, .45),
        inset 3px 4px 7px rgba(255, 255, 255, .34),
        inset -4px -6px 11px rgba(30, 15, 3, .5);
}

/* Pressed: the clay sinks in. */
.pp-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 6px 10px -4px rgba(53, 39, 30, .55),
        inset 4px 5px 10px rgba(30, 15, 3, .55),
        inset -3px -3px 6px rgba(255, 255, 255, .15);
}

.pp-btn:focus-visible {
    outline: 3px solid var(--brand-caramel);
    outline-offset: 3px;
}

.pp-btn.is-loading {
    color: transparent;
    pointer-events: none;
}

.pp-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(246, 237, 225, .3);
    border-top-color: var(--cream);
    animation: pp-spin .7s linear infinite;
}

@keyframes pp-spin {
    to { transform: rotate(360deg); }
}

.pp-link,
.pp-link:visited {
    color: var(--brand-cafe);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(109, 57, 20, .4);
    text-underline-offset: 3px;
    transition: color .2s ease, text-decoration-color .2s ease;
}

.pp-link:hover,
.pp-link:focus {
    color: var(--brand-espresso);
    text-decoration-color: currentColor;
}

.pp-link:focus-visible {
    outline: 3px solid var(--brand-caramel);
    outline-offset: 3px;
    border-radius: 6px;
}

.pp-foot {
    margin: 26px 0 0;
    text-align: center;
    color: var(--clay-muted);
    font-size: 14px;
    font-weight: 500;
}

.pp-foot .pp-link {
    font-size: 14px;
}

.pp-recaptcha {
    display: flex;
    justify-content: center;
    margin: 0 0 22px;
}

/* ---- Register form grid ------------------------------------------------ */
.pp-form-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0 18px;
}

.pp-col-6 { grid-column: span 6; }
.pp-col-3 { grid-column: span 3; }
.pp-col-2 { grid-column: span 2; }

/* Each group is separated by a groove pressed into the clay. */
.pp-section {
    grid-column: 1 / -1;
    margin: 6px 0 20px;
    padding-top: 24px;
    border-top: 2px solid rgba(110, 78, 52, .16);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, .6);
}

.pp-section:first-child {
    padding-top: 0;
    border-top: 0;
    box-shadow: none;
}

.pp-section h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-mahogany);
}

.pp-section p {
    margin: 3px 0 0;
    color: var(--clay-muted);
    font-size: 13px;
    font-weight: 500;
}

.pp-actions {
    margin-top: 8px;
}

/* ---- Footer line ------------------------------------------------------- */
.pp-legal {
    margin-top: 32px;
    padding-top: 8px;
    text-align: center;
    color: rgba(246, 237, 225, .85);
    font-size: 13px;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
}

/* ---- Demo launcher (demo environment only) ----------------------------- */
.pp-demo {
    width: min(100%, 880px);
    margin: 0 0 22px;
    border-radius: 32px;
    background:
        radial-gradient(130% 80% at 16% 0%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(160deg, var(--clay-hi), var(--clay-face) 50%, var(--clay-lo));
    box-shadow: var(--clay-card);
    color: var(--clay-text);
    overflow: hidden;
}

.pp-demo summary {
    padding: 18px 26px;
    font-weight: 800;
    cursor: pointer;
}

.pp-demo summary:focus-visible {
    outline: 3px solid var(--brand-caramel);
    outline-offset: -3px;
}

.pp-demo-body {
    padding: 0 20px 22px;
    text-align: center;
}

.pp-demo .box {
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--clay-text);
}

.pp-demo .box-header,
.pp-demo .box-body {
    color: var(--clay-text);
    border-color: rgba(110, 78, 52, .18);
}

.pp-demo .box-header h4 {
    font-size: 14px;
    line-height: 1.6;
    color: var(--clay-muted);
}

.pp-demo .btn-app {
    background: var(--clay-well) !important;
    color: var(--brand-mahogany) !important;
    border: 0;
    border-radius: 20px;
    box-shadow:
        0 8px 14px -6px rgba(53, 39, 30, .45),
        inset 2px 3px 5px rgba(255, 255, 255, .8),
        inset -3px -4px 7px rgba(110, 78, 52, .25);
}

.pp-demo .btn-app:hover {
    background: #f1e4d6 !important;
}

/* Date picker menu is appended to <body>, so it must sit above the shell. */
.datepicker,
.select2-container--open {
    z-index: 10050 !important;
}

.datepicker {
    font-family: var(--pp-font);
}

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 700px) {
    .pp-col-3,
    .pp-col-2 {
        grid-column: span 6;
    }
}

@media (max-width: 520px) {
    .pp-stage {
        padding: 88px 14px 22px;
    }

    .pp-card {
        padding: 30px 22px 26px;
        border-radius: 32px;
    }

    .pp-title {
        font-size: 34px;
    }

    .pp-mark-name {
        display: none;
    }

    .g-recaptcha {
        transform: scale(.88);
        transform-origin: center;
    }
}

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .pp-aurora,
    .pp-card {
        animation: none;
    }

    .pp-input,
    .pp-btn {
        transition: none;
    }
}
