/* 会員ログインモーダル (shop・ネイティブ <dialog>) — mobile-first (base=モバイル / @media min-width:1000px で PC=旧実測値) */

/* ダイアログ本体 (showModal() で top-layer、open 属性で非モーダル表示)。mobile-first: SP は全幅 (旧 SP 踏襲) */
.login-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    color: var(--shop-text);
    background: var(--shop-bg);
    border: none;
}

/* backdrop は showModal() 時のみ描画される (旧: rgba(208,208,208,0.8)) */
.login-dialog::backdrop {
    background: rgb(208 208 208 / 80%);
}

/* ヘッダ帯 */
.login-dialog-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    background: #2d2f34; /* rgb(45,47,52) */
}

.login-dialog-title {
    font-size: 1rem; /* 16px */
    font-weight: 700;
    color: #fff;
}

.login-dialog-close {
    position: absolute;
    top: 6px;
    right: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    cursor: pointer;
    background: #4e646f; /* rgb(78,100,111) */
    border: none;
}

.login-dialog-close img {
    width: 14px;
    height: 14px;
}

/* 本文 */
.login-dialog-body {
    padding: 30px 20px;
}

.login-guest {
    margin-top: 24px;
}

/* 見出し・案内 */
.login-heading {
    max-width: 700px;
    margin-inline: auto;
    font-size: 1.2rem; /* 19.2px */
    font-weight: 700;
}

.login-lead {
    max-width: 700px;
    margin-inline: auto;
    margin-top: 16px;
    padding-bottom: 16px;
    font-size: 1rem; /* 16px */
    font-weight: 700;
    line-height: 1.6;
    border-bottom: 1px solid #707070;
}

/* 非会員案内は旧同様 3 行を行間広め (旧実測 line-height 32px = 2.0) */
.login-guest .login-lead {
    line-height: 2;
}

/* 入力フィールド */
.login-field {
    max-width: 700px;
    margin-inline: auto;
    margin-top: 24px;
}

.login-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem; /* 12.8px */
}

.login-required {
    margin-left: 2px;
    color: #d7373f; /* rgb(215,55,63) */
}

.login-input {
    width: 100%;
    height: 34px;
    padding: 8px 11px;
    font-size: 0.9rem;
    background: #fff;
    border: 1px solid #707070;
    border-radius: 5px;
}

/* パスワード表示トグル */
.login-reveal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* 注釈 (レガシー移行案内) */
.login-annotation {
    max-width: 700px;
    margin-inline: auto;
    margin-top: 16px;
    font-size: 0.9rem; /* 14.4px */
    line-height: 24px;
    color: #ce3f3f; /* rgb(206,63,63) */
}

/* エラー表示 (共通文言) */
.login-error {
    max-width: 700px;
    margin-inline: auto;
    margin-top: 16px;
    padding: 10px 12px;
    font-size: 0.875rem;
    color: var(--shop-accent);
    background: #fdecec;
    border: 1px solid #f3c0c0;
    border-radius: 4px;
}

/* ボタン行 */
.login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* ログインモーダルのボタンは共通 `.btn` / `.btn-primary` / `.btn-green` (common.css) を使用。 */

/* /login の背面フォールバック (モーダル背後・no-JS 時の main) */
.login-fallback {
    padding: 48px 16px;
    text-align: center;
}

.login-fallback-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.login-fallback-note {
    margin-top: 12px;
    color: var(--shop-muted);
}

/* PC (>=1000px): 旧実測値 */
@media (width >= 1000px) {
    .login-dialog {
        width: 1000px;
        max-width: 1000px;
        max-height: calc(100vh - 80px);
        margin: 40px auto;
    }

    .login-dialog-body {
        padding: 30px 40px;
    }

    .login-field {
        margin-top: 32px;
    }

    .login-input {
        width: 193px;
    }
}
