/* "Din konto" dialog (account-tools.js) and the dashboard's conflict-copy bar (app.js) */

.account-section {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
#account-modal-body > .account-section:first-of-type {
    border-top: none;
}
.account-section h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}
.account-note,
.modal-body .account-section p.account-note {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.45;
}
.account-section .btn {
    min-height: 44px;
}
.account-section.danger h4 {
    color: var(--red);
}
.account-danger {
    color: var(--red) !important;
    border-color: var(--red) !important;
}

.account-usage {
    margin-top: 10px;
    overflow-x: auto;
}
.account-usage h4 {
    margin: 14px 0 6px;
    font-size: 0.875rem;
}
.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.account-table th,
.account-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}
.account-table th {
    color: var(--muted);
    font-weight: 600;
}
.account-table td.num,
.account-table th:not(:first-child) {
    text-align: right;
}
.account-table tr.inactive td {
    color: var(--muted);
    font-style: italic;
}

/* Copies the app made in sync conflicts: a quiet ruled line above the list */
.conflict-copies-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
}
.conflict-copies-bar .btn {
    min-height: 36px;
    padding: 0 12px;
    flex: 0 0 auto;
}

/* The dialogs grow with the account's sections: the body scrolls, header and footer stay */
#modal-account .modal-dialog,
#modal-new-password .modal-dialog,
#modal-forgot-password .modal-dialog {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
#modal-account .modal-body,
#modal-new-password .modal-body,
#modal-forgot-password .modal-body {
    overflow-y: auto;
}
/* Above every other dialog: a new password comes first */
#modal-new-password {
    z-index: 1100;
}

/* Fields in "Din konto", "Vælg ny adgangskode" and "Glemt adgangskode" */
.account-fields .form-group,
.account-inline-form .form-group {
    margin-bottom: 12px;
}
.account-inline-form {
    margin: 0;
}
.account-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}
.account-row > .input-with-icon {
    flex: 1 1 12rem;
    min-width: 0;
}
.account-row > .btn {
    flex: 0 0 auto;
    min-height: 44px;
}
.account-password,
.account-temp-code {
    font-family: var(--font-editor);
}
.account-temp-code {
    letter-spacing: .04em;
}
.modal-body p.account-hint,
.account-hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.8125rem;
}
.modal-body p.account-error,
.account-error {
    margin: 0 0 10px;
    color: var(--red);
    font-size: 0.875rem;
    line-height: 1.45;
}
.modal-body p.account-done,
.account-done {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* "Glemt adgangskode?" under the login buttons: a quiet text link with a full touch target */
.login-forgot-link {
    align-self: center;
    min-height: 44px;
    padding: 0 12px;
    background: transparent;
    border: 0;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: .2em;
    cursor: pointer;
}
.login-forgot-link:hover {
    text-decoration-thickness: 2px;
}
.login-forgot-link:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
