.passkey-login {
    margin-top: 1.25rem;
    /* Accent colour, overridable per-site via the admin setting (inline custom property). */
    --passkey-btn-color: #0f172a;
}

.passkey-login .passkey-login-divider {
    font-size: 11px;
    letter-spacing: 1px;
}

/* Optional admin-authored explanation shown above the passkey button. */
.passkey-login .passkey-login-description {
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

/*
 * Self-contained styling for the "Sign in with passkey" button so it renders as a
 * clearly visible button on ANY front theme - frontend themes often do not ship
 * the Bootstrap/Tabler `.btn` classes. Three variants (outline / solid / minimal)
 * are selectable from the admin settings; the accent colour is a CSS variable.
 */
.passkey-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 24px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    background-color: transparent;
    color: var(--passkey-btn-color, #0f172a);
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, filter .18s ease, transform .05s ease;
}

.passkey-login-btn:active {
    transform: translateY(1px);
}

.passkey-login-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.passkey-login-btn svg,
.passkey-login-btn .ti {
    width: 20px;
    height: 20px;
    font-size: 20px;
    flex-shrink: 0;
}

/* Outline (default): bordered, fills on hover */
.passkey-login-btn--outline {
    color: var(--passkey-btn-color, #0f172a);
    background-color: #fff;
    border-color: var(--passkey-btn-color, #0f172a);
}

.passkey-login-btn--outline:hover,
.passkey-login-btn--outline:focus-visible {
    color: #fff;
    background-color: var(--passkey-btn-color, #0f172a);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .22);
}

/* Solid: filled accent, darkens on hover */
.passkey-login-btn--solid {
    color: #fff;
    background-color: var(--passkey-btn-color, #0f172a);
    border-color: var(--passkey-btn-color, #0f172a);
}

.passkey-login-btn--solid:hover,
.passkey-login-btn--solid:focus-visible {
    filter: brightness(0.9);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .22);
}

/* Minimal: text + icon link, no box */
.passkey-login-btn--minimal {
    width: auto;
    min-height: auto;
    margin: 0 auto;
    padding: 6px 4px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    color: var(--passkey-btn-color, #0f172a);
}

.passkey-login-btn--minimal:hover,
.passkey-login-btn--minimal:focus-visible {
    text-decoration: underline;
}

/*
 * Polished, theme-independent styling for the passkey naming/confirm modal.
 * Front themes only style their own bespoke modals, so a generic Bootstrap modal
 * looks plain - this gives ours a consistent, modern look on any theme.
 */
.pk-passkey-modal .modal-dialog {
    max-width: 460px;
}

.pk-passkey-modal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    overflow: hidden;
}

.pk-passkey-modal .modal-header {
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.pk-passkey-modal .modal-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

/* `.modal.pk-passkey-modal` (double class, specificity 0,3,0) outranks front themes
   that globally reset `.modal .modal-body { padding: 0 }` (e.g. Amerce, 0,2,0), so our
   modal keeps its body padding regardless of stylesheet load order. */
.modal.pk-passkey-modal .modal-body {
    padding: 22px;
}

.pk-passkey-modal .modal-body p {
    color: #475569;
}

.pk-passkey-modal .pk-modal-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #0f172a;
    background-color: #fff;
    border: 1.5px solid rgba(15, 23, 42, .16);
    border-radius: 10px;
    outline: none;
    box-shadow: none;
}

.pk-passkey-modal .pk-modal-input:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, .12);
}

.pk-passkey-modal .pk-modal-help {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #64748b;
}

.pk-passkey-modal .modal-footer {
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.pk-passkey-modal .modal-footer .btn {
    min-height: 44px;
    margin: 0;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: filter .15s ease, background-color .15s ease;
}

.pk-passkey-modal .modal-footer .btn-secondary {
    color: #0f172a;
    background-color: rgba(15, 23, 42, .07);
}

.pk-passkey-modal .modal-footer .btn-secondary:hover {
    background-color: rgba(15, 23, 42, .12);
}

.pk-passkey-modal .modal-footer .btn-primary {
    color: #fff;
    background-color: #0f172a;
}

.pk-passkey-modal .modal-footer .btn-primary:hover {
    filter: brightness(1.15);
}

/* --- Layout + section rhythm ------------------------------------------------
   The plugin owns this, deliberately. It used to lean on Bootstrap utilities
   (d-flex / mb-3 / p-3 / border), but storefront themes redefine those names on
   their own scale and mark them !important - in the Amerce theme `mb-3` is 3px,
   so the sections collapsed into each other. Keyed to plugin classes only, the
   spacing is identical in every theme and in the admin panel. */
.passkey-management .passkey-device-compat {
    display: block;
    margin-bottom: 1rem;
}

.passkey-management .passkey-register-action {
    margin-bottom: 1.5rem;
}

.passkey-management .passkey-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.passkey-management .passkey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: .5rem;
}

.passkey-management .passkey-item-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

.passkey-management .passkey-empty-state {
    padding: 1rem 0;
}
