/* tryplatemate.app/account: builds on landing.css (tokens, header, footer, .btn) */

.account {
    padding: 48px 0 88px;
    min-height: calc(100vh - 220px);
}

.account .narrow {
    max-width: 520px;
}

.account h1 {
    font-size: clamp(32px, 7vw, 44px);
    margin-bottom: 8px;
}

.account h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.account p {
    margin: 0 0 14px;
}

/* Only the panels for the current state show */
.account .panel {
    display: none;
}

.account[data-state="loading"] .state-loading,
.account[data-state="signed-out"] .state-signed-out,
.account[data-state="signed-in"] .state-signed-in,
.account[data-state="deleted"] .state-deleted {
    display: block;
}

.panel {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.state-loading {
    border: 0;
    background: none;
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    margin: 24px auto;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: account-spin .8s linear infinite;
}

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

.account-status {
    min-height: 0;
    margin: 0;
}

.account-status:not(:empty) {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--raised);
    font-size: 15px;
}

.account-status.is-error {
    background: rgba(240, 113, 106, .12);
    color: #F7A39E;
}

.account-status.is-success {
    background: rgba(95, 211, 160, .12);
    color: #8FE3BE;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 14px;
}

.muted a,
.form-links a {
    color: var(--text);
}

.account .btn {
    width: 100%;
}

.btn-provider {
    background: #fff;
    color: #1F1F1F;
}

.btn-provider:hover {
    background: #EDEDED;
}

.btn-quiet {
    background: var(--raised);
    color: var(--text);
}

.btn-quiet:hover {
    background: var(--border);
}

.btn-danger {
    background: #E5534B;
    color: #fff;
}

.btn-danger:hover {
    background: #F0716A;
}

.btn:disabled,
.btn:disabled:hover {
    background: var(--raised);
    color: var(--muted);
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.account-form {
    display: grid;
    gap: 8px;
}

.account-form label {
    font-size: 15px;
    font-weight: 600;
}

.account-form input {
    width: 100%;
    min-height: 50px;
    margin-bottom: 8px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--canvas);
    color: var(--text);
    font: 17px var(--font);
}

.account-form input:focus {
    border-color: var(--accent);
    outline: none;
}

.form-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 16px 0 !important;
    font-size: 15px;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

.link-button:disabled {
    color: var(--muted);
    cursor: default;
}

.signed-in-as {
    overflow-wrap: anywhere;
}

.panel-danger {
    border-color: rgba(229, 83, 75, .45);
}

.notes {
    margin: 0 0 20px;
    padding-left: 20px;
    color: var(--muted);
    font-size: 15px;
}

.notes li + li {
    margin-top: 6px;
}
