/* Base */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

/* Same panel design as the SSO auth pages (hostinger/sso#1798): a white panel
   on a dark backdrop, at a fixed width and top offset; its height follows its
   content, with the panel padding as the bottom spacing. */
:root {
    --bg: #100C27;
    --ink: #18181A;
    --ink-muted: #6D7081;
    --line: #E5E5E5;
    --surface-hover: #F5F4FA;
    --accent: #673DE6;
    --accent-hover: #5025D1;
    --accent-soft: #EBE4FF;
    --surface: #F4F4F7;
    --line-strong: #B4B4C0;
    --danger: #B91C1C;
    --success: #15803D;
    --card-width: 592px;
    --card-padding: 48px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: "DM Sans", sans-serif;
    color: var(--ink);
    background-color: var(--bg);
}

.logo {
    flex: none;
    align-self: flex-start;
}

.logo img {
    display: block;
    max-height: 24px;
    padding: 24px 32px;
    /* The brand mark ships in its brand colour; the dark backdrop needs white. */
    filter: brightness(0) invert(1);
}

main {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* The bottom padding matches the logo row above, so the panel centres on the
   viewport rather than on the space left under the logo. */
.container {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 24px 16px 96px;
}

.content {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--card-width);
    padding: var(--card-padding);
    border-radius: 16px;
    background-color: #FFF;
}

.button {
    padding: 0;
    border: 0;
    background-color: unset;
    cursor: pointer;
    font-family: inherit;
}

/* Utilities */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-5 {
    margin-bottom: 5px !important;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mb-25 {
    margin-bottom: 25px;
}

.mt-4 {
    margin-top: 4px;
}

.mt-12 {
    margin-top: 12px;
}

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.border-box {
    box-sizing: border-box;
}

.color-red {
    color: var(--danger);
}

.color-black-50 {
    color: var(--ink-muted);
}

.fs-14 {
    font-size: 14px;
}

.fw-700 {
    font-weight: 700 !important;
}

.hidden {
    display: none !important;
}

.non-resizable {
    resize: none;
}

/* Panel header */
.form-title,
.page-title {
    margin: 0;
    font-size: 36px;
    font-weight: 400;
    line-height: 44px;
    text-align: center;
    color: var(--ink);
}

/* Heading over the backdrop, for pages made of several cards instead of one panel. */
.page-title {
    margin-bottom: 24px;
    color: #FFF;
}

/* Text links keep their colour on hover and only gain an underline. */
.auth-back-link:hover,
.secondary-action:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Form */
.auth-form {
    width: 100%;
    margin-top: 32px;
}

.auth-field {
    margin-bottom: 24px;
}

.label {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: var(--ink);
}

.input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: #FFF;
    box-shadow: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    color: var(--ink);
    direction: ltr;
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea.input {
    height: auto;
    padding: 10px 14px;
}

.input::placeholder {
    color: var(--ink-muted);
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    line-height: 18px;
    color: var(--ink-muted);
}

.auth-hint strong {
    color: var(--ink);
}

.primary-action,
.outline-action {
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease;
}

.primary-action {
    background-color: var(--accent);
    color: #FFF;
}

.primary-action:hover {
    background-color: var(--accent-hover);
}

.outline-action {
    border-color: var(--ink);
    background-color: #FFF;
    color: var(--ink);
}

.outline-action:hover {
    background-color: var(--surface-hover);
}

.primary-action:disabled,
.outline-action:disabled {
    cursor: not-allowed;
}

/* Secondary action that belongs to the form, so it sits right below it. */
.auth-form-footer {
    margin-top: 16px;
    text-align: center;
}

.secondary-action {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
    color: var(--ink);
    text-decoration: none;
}

.auth-card-footer {
    padding-top: 24px;
}

.auth-back-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
    color: var(--ink);
    text-decoration: none;
}

form[data-submit-loading] button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.form-submit-loading__label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    line-height: 24px;
    transition: opacity .2s ease;
}

form[data-submit-loading] button[type="submit"].is-loading {
    cursor: wait;
    box-shadow: 0 6px 18px rgba(80, 37, 209, .28);
}

form[data-submit-loading] button[type="submit"].is-loading::before {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .15), #FFF, rgba(255, 255, 255, .15));
    content: "";
    animation: form-submit-loading-progress 1.15s ease-in-out infinite;
}

form[data-submit-loading] button[type="submit"].is-loading::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -45%;
    width: 35%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
    content: "";
    animation: form-submit-loading-shimmer 1.3s ease-in-out infinite;
}

form[data-submit-loading] button[type="submit"].is-loading .form-submit-loading__label {
    animation: form-submit-loading-label-pulse 1.15s ease-in-out infinite;
}

form[data-submit-loading] button[type="submit"].outline-action.is-loading {
    box-shadow: 0 6px 18px rgba(24, 24, 26, .12);
}

form[data-submit-loading] button[type="submit"].outline-action.is-loading::before {
    background: linear-gradient(90deg, rgba(24, 24, 26, .15), var(--ink), rgba(24, 24, 26, .15));
}

form[data-submit-loading] button[type="submit"].outline-action.is-loading::after {
    background: linear-gradient(90deg, transparent, rgba(24, 24, 26, .08), transparent);
}

@keyframes form-submit-loading-progress {
    from {
        transform: translateX(-110%);
    }

    to {
        transform: translateX(350%);
    }
}

@keyframes form-submit-loading-label-pulse {
    50% {
        opacity: .7;
    }
}

@keyframes form-submit-loading-shimmer {
    50%, 100% {
        left: 110%;
    }
}

.alert-success,
.alert-info,
.alert-error {
    box-sizing: border-box;
    width: 100%;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 18px;
    text-align: center;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
}

.alert-info {
    background-color: var(--accent-soft);
    color: var(--ink);
}

.alert-error {
    background-color: #F8D7DA;
    color: #721C24;
}

/* Reason picker: one list, like the SSO "More options" panel */
.account-recovery-reason-picker {
    margin-top: 32px;
}

.account-recovery-reason-heading {
    margin-bottom: 16px;
}

.account-recovery-reason-heading h2 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 24px;
}

.account-recovery-reason-heading p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 22px;
}

.account-recovery-reason-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.account-recovery-reason-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    color: var(--ink);
    text-decoration: none;
    transition: background-color .15s ease;
}

.account-recovery-reason-card + .account-recovery-reason-card {
    border-top: 1px solid var(--line);
}

.account-recovery-reason-card:hover {
    background-color: var(--surface-hover);
}

/* The list clips its children, so the ring has to sit inside the row. */
.account-recovery-reason-card:focus-visible {
    border-radius: 0;
    outline-offset: -2px;
}

.account-recovery-reason-icon {
    display: flex;
    flex: none;
    color: var(--accent);
}

.account-recovery-reason-icon svg {
    width: 20px;
    height: 20px;
}

.account-recovery-reason-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.account-recovery-reason-arrow {
    flex: none;
    width: 18px;
    height: 18px;
    margin-left: auto;
    color: var(--ink-muted);
}

.account-recovery-reason-card:hover .account-recovery-reason-arrow {
    color: var(--ink);
}

/* Two-option pages: the recommended path, then a fallback. Hierarchy comes
   from the icon badge and the button weight. */
.ar-recovery-options {
    margin-top: 32px;
}

.ar-recovery-option {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.ar-recovery-option-icon {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    place-items: center;
}

.ar-recovery-option-recommended .ar-recovery-option-icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.ar-recovery-option-fallback .ar-recovery-option-icon {
    background: var(--surface);
    color: var(--ink-muted);
}

.ar-recovery-option-icon svg {
    width: 20px;
    height: 20px;
}

.ar-recovery-option-body {
    grid-column: 2;
    grid-row: 1;
}

.ar-recovery-option-title {
    margin: 8px 0 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
}

.ar-recovery-option-text {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 22px;
}

.ar-recovery-option-fallback .ar-recovery-option-text {
    color: var(--ink-muted);
}

.ar-recovery-option-text:last-child {
    margin-bottom: 0;
}

.ar-recovery-option-email,
.ar-recovery-option-found-email {
    color: var(--ink);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ar-recovery-option-field {
    margin-bottom: 16px;
}

.ar-recovery-option-action {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 20px;
}

.ar-recovery-options-divider {
    height: 1px;
    margin: 20px 0;
    border: 0;
    background: var(--line);
}

/* Document upload pages (update, verify identity) */
.ar-content {
    max-width: 900px;
}

.ar-update-content {
    padding: 0;
    background: transparent;
}

.ar-update-content > .alert-info {
    margin-top: 0;
    font-size: 14px;
    line-height: 22px;
    text-align: left;
}

.ar-update-form {
    align-items: stretch;
    gap: 20px;
}

.ar-update-form > .alert-error,
.ar-update-form > .alert-success {
    margin: 0 !important;
    font-size: 14px;
    line-height: 22px;
}

.ar-form-card {
    width: 100%;
    padding: 32px;
    border-radius: 16px;
    box-sizing: border-box;
    background: #FFF;
}

.ar-form-card > label,
.ar-form-card > small {
    display: block;
}

.ar-section-title {
    margin: 0 0 20px;
    font-size: 20px;
    line-height: 28px;
}

.ar-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ar-form-card > small:last-child {
    margin-bottom: 0;
}

.ar-tabs-nav {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
}

.ar-tab-btn {
    flex: none;
    margin-bottom: -1px;
    padding: 12px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--ink-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.ar-tab-btn:hover {
    color: var(--ink);
}

.ar-tab-btn.ar-active {
    border-bottom-color: var(--ink);
    color: var(--ink);
    font-weight: 700;
}

.ar-tab-btn:focus-visible {
    outline-offset: -2px;
}

.ar-tab-panel {
    display: none;
    padding-top: 20px;
}

.ar-tab-panel.ar-active {
    display: block;
}

.ar-tab-desc {
    margin: 0 0 16px;
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 22px;
}

.ar-examples-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 16px;
}

.ar-example-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.ar-example-label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 22px;
}

.ar-example-label.ar-bad {
    color: var(--danger);
}

.ar-example-label.ar-good {
    color: var(--success);
}

.ar-example-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 20px;
}

.ar-example-list li {
    margin-bottom: 4px;
}

.ar-dropzone {
    padding: 28px 16px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-muted);
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.ar-dropzone:hover {
    border-color: var(--ink-muted);
    background: var(--surface-hover);
}

/* A file is being dragged over the zone. */
.ar-dropzone--hover {
    border-style: solid;
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.ar-dropzone-inner svg {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto 8px;
}

.ar-dropzone-inner strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 14px;
    line-height: 22px;
}

.ar-dropzone-inner small {
    font-size: 13px;
    line-height: 20px;
}

.ar-upload-limits {
    display: block;
    margin-top: 12px;
    line-height: 20px;
}

.ar-files-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: 14px;
}

.ar-files-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.ar-files-list span {
    overflow-wrap: anywhere;
}

.ar-files-list button {
    flex: none;
}

.ar-tab-btn.ar-required-flash {
    border-bottom-color: var(--danger);
    color: var(--danger);
}

.ar-dropzone.ar-required-flash {
    border-color: var(--danger);
    background: #FEF2F2;
    color: var(--danger);
    animation: ar-required-shake .4s ease;
}

@keyframes ar-required-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Responsive */
@media (max-width: 700px) {
    .ar-form-card {
        padding: 20px;
    }

    .ar-examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    :root {
        --card-padding: 28px 20px;
    }

    .logo img {
        padding: 20px;
    }

    .container {
        padding-bottom: 88px;
    }

    .form-title,
    .page-title {
        font-size: 26px;
        line-height: 34px;
    }

    .content {
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .input,
    .primary-action,
    .outline-action,
    .account-recovery-reason-card,
    .ar-dropzone,
    form[data-submit-loading] button[type="submit"],
    .form-submit-loading__label {
        transition: none;
    }

    form[data-submit-loading] button[type="submit"].is-loading::before,
    form[data-submit-loading] button[type="submit"].is-loading::after {
        display: none;
    }

    form[data-submit-loading] button[type="submit"].is-loading .form-submit-loading__label {
        opacity: .8;
        animation: none;
    }

    .ar-dropzone.ar-required-flash {
        animation: none;
    }
}
