@charset "UTF-8";

/* ── マイページ固有スタイル ───────────────── */

:root {
    /*--insection-border-color: #e5e7eb;*/
    --insection-border-color: #ccc;
    --notice-bgcolor: rgba(224, 224, 232, 0.9);
    --modalsheet-dark-bgcolor: rgba(0, 0, 0, 0.75);
    --modalsheet-clear-bgcolor: rgba(0, 0, 0, 0);

    --subtitle-color: #666;
    --labeltitle-color: #888;
    --active-tag-color: #009900;
}

header {
    position: relative;
    margin-bottom: 3rem;
}

header h1 {
    width: 40%;
    max-width: 200px;
}

.card-wide {
    position: relative;
}

.header-menu-pane {
    position: absolute;
    right: 0px;
    top: 0px;
}

.subpage-title {
    border-bottom: var(--title-point-color) 3px double;
    padding: 0.25rem;
    font-weight: bold;
    color: var(--subtitle-color);
}

.user-info {
    background: #f9fafb;
    border: 1px solid var(--insection-border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

.user-info dt {
    font-size: 0.75rem;
    color: var(--labeltitle-color);
    margin-bottom: 2px;
}

.user-info dd {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.user-info dd:last-of-type {
    margin-bottom: 0px;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.small-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    line-height: 100%;
}

.smallest-btn {
    padding: 0.25rem 0.125rem;
    font-size: 0.9rem;
    line-height: 100%;
}

.smallest-btn .icon-in-btn {
    margin-right: 0px;
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}

.btn-primary:hover {
    background: #3a7bc8;
}

.btn-outline {
    border: var(--general-border-color) 1px solid;
}

.btn-outline-danger {
    background: none;
    color: #dc2626;
    border: 1px solid #dc2626;
}

.btn-outline-danger:hover {
    background: #fef2f2;
}

.btn-outline-disabled {
    color: #999;
    border: 1px solid #999;
}

.code-box {
    white-space: pre-wrap;
    word-break: break-all;
    background: #111827;
    color: #f9fafb;
    border-radius: 4px;
    padding: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
}

.mfa-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 12px 0 18px;
}

.mfa-qr-image {
    width: 260px;
    height: 260px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
}

.mfa-mobile-action {
    margin: 0.5rem 0 1rem;
}

.data-table tr {
    vertical-align: middle;
}

.data-table th, .data-table td {
    padding: 0.5rem 0.25rem;
    border-bottom: var(--insection-border-color) 1px solid;
}

.data-table th {
    font-size: 0.75rem;
    font-weight: normal;
    line-height: 150%;
    color: var(--labeltitle-color);
    text-align: center;
}

.tag {
    font-size: 0.75rem;
    line-height: 150%;
    font-weight: bold;
    color: var(--active-tag-color);
}

.label-attention {
    color: #ff0000;
}

#session-list-table {
    width: 100%;
    margin-bottom: 1.5em;
}

#identities-table {
    width: 100%;
}

.identity-icon {
    display: inline-block;
    border: #000 1px dotted;
    width: 24px;
}

.backlink {
    text-align: center;
}


/* ── プロモバナー ───────────────────────────── */

.promo-banner {
    box-sizing: border-box;
    position: relative;
    padding: 1rem;
    background-color: #dfd;
    border: var(--insection-border-color) 1px solid;
    margin-bottom: 2rem;
}

.promo-banner-close {
    position: absolute;
    right: 0px;
    top: 0px;
    background-color: #dfd;
}

.promo-banner h3 {
    font-weight: bold;
}

.promo-banner p {
    margin: 1rem 0px;
}


/* ── パスキー ──────────────────────────────── */

#passkeys-table {
    width: 100%;
}

.passkey-pane {
    box-sizing: border-box;
    background-color: rgba(48, 169, 215, 0.05);
    box-shadow: 0.25rem 0.25rem 0.25rem #ccc;
    border: var(--insection-border-color) 1px solid;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.passkey-pane-name {
    position: relative;
}

.passkey-pane-nameaction {
    position: absolute;
    right: 0px;
    top: 0px;
}

.passkey-pane-editaction {
    margin: 0.5rem 0px;
    text-align: right;
}

.passkey-pane-datetime {
    padding: 0.25rem 0.5rem;
    border-bottom: var(--insection-border-color) 1px solid;
    font-size: 0.75rem;
    color: #888;
}

.passkey-pane-keyaction {
    margin-top: 0.5rem;
}

#mfa-user-info {
    margin-bottom: 1rem;
}

#mfa-recovery h3 {
    font-weight: bold;
}

/* ── 再認証 ───────────────────────────────── */

.modal {
    z-index: 50;
}

#reauth-switch-link-wrap {
    box-sizing: border-box;
    display: table;
    margin: 1rem 0px 0rem auto;
}

#reauth-cancel {
    margin-top: 2rem;
}

#reauth-picker-list {
    margin-bottom: 2rem;
}

#reauth-picker-list .linkbtn {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 150%;
}

/* ── 初回利用同意 ─────────────────────────── */

#initial-consent-modal {
    z-index: 60;
}

.initial-consent-actions {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.initial-consent-actions .btn {
    flex: 1 1 0;
}

.initial-consent-decline-note.note {
    display: block;
    margin: 1.25rem 0 0;
    text-align: left;
}

/* ── 通知 ────────────────────────────────── */

.notice {
    box-sizing: border-box;
    position: fixed;
    left: 0px;
    top: 0px;
    z-index: 1000;
    width: 100%;
    min-height: 2rem;
    background-color: var(--notice-bgcolor);
    text-align: center;
    padding: 0.25rem 1rem;
    pointer-events: none;
    transform: translateY(-100%);
    opacity: 0;
    animation: notice-slide 3.8s ease both;
}

.notice-success {
    background-color: rgba(224, 244, 232, 0.96);
}

.notice-error {
    background-color: rgba(254, 226, 226, 0.96);
    color: #991b1b;
}

@keyframes notice-slide {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    12% {
        transform: translateY(0);
        opacity: 1;
    }

    82% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notice {
        transform: none;
        animation: none;
        opacity: 1;
    }
}


/* ── メニュー ──────────────────────────────── */

.account-menu-modalsheet {
    position: fixed;
    left: 0px;
    top: 0px;
    z-index: 10;
    width: 100%;
    height: 100%;
    background-color: var(--modalsheet-clear-bgcolor);
}

.account-menu-sheet {
    box-sizing: border-box;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 20;
    width: min(22rem, calc(100% - 3rem));
    padding: 1rem;
    border: 1px solid var(--insection-border-color);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.16);
    opacity: 0;
    transform: scale(0.92);
    transform-origin: top right;
    transition: opacity 160ms ease, transform 160ms ease;
}

.account-menu-sheet.is-open {
    opacity: 1;
    transform: scale(1);
}

.account-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.account-menu-danger h2 {
    margin-bottom: 0.75rem;
}

.account-menu-danger p {
    margin-bottom: 1rem;
    line-height: 150%;
}

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

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

@media (prefers-reduced-motion: reduce) {
    .account-menu-sheet {
        transition: none;
    }
}
