:root {
    --app-lock-primary: #6d28d9;
    --app-lock-secondary: #0ea5e9;
    --app-lock-danger: #b91c1c;
    --app-lock-success: #047857;
    --app-lock-text: #111827;
    --app-lock-muted: #6b7280;
}

html.simplpay-locked,
html.simplpay-locked body {
    overflow: hidden !important;
}

html.simplpay-locked body > *:not(#simplPayLockRoot) {
    visibility: hidden !important;
}

#simplPayLockRoot {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    overflow-y: auto;
    padding:
        max(22px, env(safe-area-inset-top))
        16px
        max(22px, env(safe-area-inset-bottom));
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(14, 165, 233, 0.28),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 12%,
            rgba(109, 40, 217, 0.32),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #f5f3ff,
            #eff6ff 54%,
            #faf5ff
        );
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

#simplPayLockRoot.open {
    display: grid;
    place-items: center;
}

.simplpay-lock-card {
    width: min(100%, 410px);
    padding: 28px 22px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 30px;
    color: var(--app-lock-text);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 30px 90px rgba(76, 29, 149, 0.24);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.simplpay-lock-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.simplpay-lock-logo {
    width: 74px;
    height: 74px;
    border-radius: 23px;
    box-shadow:
        0 17px 36px rgba(109, 40, 217, 0.24);
}

.simplpay-lock-title {
    margin: 18px 0 7px;
    font-size: 25px;
    font-weight: 950;
    letter-spacing: -0.8px;
}

.simplpay-lock-subtitle {
    margin: 0;
    color: var(--app-lock-muted);
    font-size: 13px;
    line-height: 1.55;
}

.simplpay-pin-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px 0 20px;
}

.simplpay-pin-dot {
    width: 15px;
    height: 15px;
    border: 2px solid #c4b5fd;
    border-radius: 50%;
    background: #ffffff;
    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease;
}

.simplpay-pin-dot.filled {
    border-color: var(--app-lock-primary);
    background:
        linear-gradient(
            135deg,
            var(--app-lock-primary),
            var(--app-lock-secondary)
        );
    transform: scale(1.08);
}

.simplpay-lock-message {
    min-height: 38px;
    margin: 0 0 14px;
    padding: 9px 11px;
    border-radius: 12px;
    color: var(--app-lock-muted);
    background: #f9fafb;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.45;
    text-align: center;
}

.simplpay-lock-message.error {
    color: #991b1b;
    background: #fee2e2;
}

.simplpay-lock-message.success {
    color: #065f46;
    background: #d1fae5;
}

.simplpay-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.simplpay-key {
    min-height: 62px;
    border: 1px solid #e5e7eb;
    border-radius: 19px;
    cursor: pointer;
    color: #111827;
    background: #ffffff;
    box-shadow:
        0 7px 18px rgba(15, 23, 42, 0.06);
    font-size: 21px;
    font-weight: 900;
    transition:
        transform 0.14s ease,
        border-color 0.14s ease,
        background 0.14s ease;
    -webkit-tap-highlight-color: transparent;
}

.simplpay-key:hover {
    border-color: #a78bfa;
    background: #faf5ff;
}

.simplpay-key:active {
    transform: scale(0.96);
}

.simplpay-key.utility {
    color: #5b21b6;
    background: #f5f3ff;
    font-size: 14px;
}

.simplpay-key.danger {
    color: var(--app-lock-danger);
    background: #fff7f7;
    font-size: 18px;
}

.simplpay-lock-footer {
    margin: 18px 0 0;
    color: #9ca3af;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.simplpay-lock-progress {
    height: 4px;
    margin: 18px 0 0;
    overflow: hidden;
    border-radius: 999px;
    background: #ede9fe;
}

.simplpay-lock-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--app-lock-primary),
            var(--app-lock-secondary)
        );
    transition: width 0.25s ease;
}

.simplpay-lock-secondary-actions {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.simplpay-lock-secondary-button {
    min-height: 44px;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    cursor: pointer;
    color: #5b21b6;
    background: #f5f3ff;
    font-size: 11px;
    font-weight: 850;
}

.simplpay-lock-secondary-button.danger {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fff7f7;
}

.simplpay-lock-shake {
    animation: simplpayLockShake 0.36s ease;
}

@keyframes simplpayLockShake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-5px);
    }
}

@media (max-width: 390px) {
    .simplpay-lock-card {
        padding: 24px 17px;
        border-radius: 25px;
    }

    .simplpay-key {
        min-height: 57px;
    }
}

/* PATCH-SIMPLPAY-018B */

.simplpay-session-settings {
    grid-column: 1 / -1;
    padding: 15px;
    border: 1px solid #ddd6fe;
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            #faf5ff,
            #eff6ff
        );
}

.simplpay-session-settings-title {
    margin: 0 0 5px;
    color: #312e81;
    font-size: 13px;
    font-weight: 950;
}

.simplpay-session-settings-note {
    margin: 0 0 13px;
    color: #6b7280;
    font-size: 10px;
    line-height: 1.5;
}

.simplpay-session-setting-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(120px, 0.65fr);
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-top: 1px solid rgba(109, 40, 217, 0.1);
}

.simplpay-session-setting-row:first-of-type {
    border-top: 0;
}

.simplpay-session-setting-label {
    color: #374151;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.4;
}

.simplpay-session-setting-select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #c4b5fd;
    border-radius: 12px;
    outline: none;
    color: #312e81;
    background: #ffffff;
    font-size: 11px;
    font-weight: 850;
}

.simplpay-session-setting-select:focus {
    border-color: #7c3aed;
    box-shadow:
        0 0 0 3px rgba(124, 58, 237, 0.11);
}

.simplpay-session-status {
    margin: 12px 0 0;
    padding: 10px 11px;
    border-radius: 12px;
    color: #065f46;
    background: #d1fae5;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 390px) {
    .simplpay-session-setting-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}
