/* 依 shadcn admin Dialog 的置中遮罩、內容間距與按鈕層級轉譯為原生 dialog。 */
.sccc-recovery {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(calc(100% - 2rem), 32rem);
    max-height: calc(100% - 2rem);
    overflow: auto;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 20px rgb(15 23 42 / 15%);
    font: 0.875rem/1.5 system-ui, sans-serif;
}

.sccc-recovery[open] {
    display: grid;
    gap: 1rem;
}

.sccc-recovery::backdrop {
    background: rgb(0 0 0 / 50%);
}

.sccc-recovery-header {
    display: grid;
    gap: 0.5rem;
}

.sccc-recovery h2,
.sccc-recovery p,
.sccc-recovery ul,
.sccc-recovery form {
    margin: 0;
}

.sccc-recovery h2 {
    color: inherit;
    font: 600 1.125rem/1.25 system-ui, sans-serif;
}

.sccc-recovery p {
    color: #475569;
}

.sccc-recovery ul {
    padding-inline-start: 1.25rem;
    overflow-wrap: anywhere;
}

.sccc-recovery-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.sccc-recovery-footer button,
.sccc-recovery-footer .sccc-recovery-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    background: #0a6eb1;
    color: #fff;
    font: 600 0.875rem/1.25 system-ui, sans-serif;
    cursor: pointer;
    text-decoration: none;
}

.sccc-recovery-footer .sccc-recovery-secondary {
    border-color: #e2e8f0;
    background: #fff;
    color: #0f172a;
}

.sccc-recovery-footer .sccc-recovery-primary:hover {
    background: #095e96;
    color: #fff;
}

.sccc-recovery-footer .sccc-recovery-secondary:hover {
    background: #f1f5f9;
}

.sccc-recovery-footer button:focus-visible,
.sccc-recovery-footer a:focus-visible {
    outline: 2px solid #0a6eb1;
    outline-offset: 3px;
}

@media (max-width: 639px) {
    .sccc-recovery-header {
        text-align: center;
    }

    .sccc-recovery-footer {
        flex-direction: column-reverse;
    }

    .sccc-recovery-footer button,
    .sccc-recovery-footer .sccc-recovery-primary {
        width: 100%;
    }
}
