/* ===========================
   認証ページ（ログイン・会員登録）共通
=========================== */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid var(--color-gold);
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.auth-card__title {
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-text);
}

.auth-card__text {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.auth-notice {
    background: #f0fff4;
    border: 1px solid #a3e0b8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #1a7a3c;
}

.auth-form--inline {
    margin-bottom: 16px;
}

.auth-errors {
    background: #fff0f0;
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.auth-errors ul {
    margin: 0;
    padding-left: 18px;
}
.auth-errors li {
    font-size: 13px;
    color: #cc0000;
}

.auth-form__group {
    margin-bottom: 16px;
}
.auth-form__group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}

.auth-required {
    color: #cc0000;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}
.auth-form__group input[type="email"],
.auth-form__group input[type="password"],
.auth-form__group input[type="text"],
.auth-form__group input[type="tel"],
.auth-form__group input[type="date"],
.auth-form__group input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
}

.auth-form__group input[type="file"] {
    width: 100%;
    font-size: 13px;
}

.auth-form__group textarea {
    width: 100%;
    min-height: 160px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.auth-form__group--checkbox label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    font-size: 13px;
}
.auth-form__group--checkbox input {
    width: auto;
}
.auth-form__group--checkbox a {
    color: var(--color-primary);
    font-weight: 700;
}

.auth-form__submit {
    width: 100%;
    margin-top: 8px;
}

.auth-card__link {
    text-align: center;
    font-size: 13px;
    margin-top: 16px;
    color: var(--color-text-light);
}
.auth-card__link a {
    color: var(--color-primary);
    font-weight: 700;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 18px;
    }
}

/* テナント登録など、項目数が多いフォーム用の横幅拡張バリエーション
   2026-08-24：480pxのままだとプラン選択カード（3列）の「サイクル」欄が狭すぎて
   文字がぎっしり折り返されてしまっていたため、560pxに拡張（すずきP指摘） */
.auth-card--wide {
    max-width: 560px;
}

/* ===========================
   生年月日・年齢に関する注意書き（2026-08-23追加）
=========================== */
.auth-age-notice {
    background: #fff8e0;
    border: 1px solid #f0d98a;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    color: #8a6a00;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
}

/* ===========================
   海外発送対応：居住国ラジオ＋国選択プルダウン（2026-09-15追加）
   会員登録フォーム（user/auth/register.twig）・配送先住所フォーム（mypage/_address_fields.twig）共通
=========================== */
.auth-form__radio-row {
    display: flex;
    gap: 20px;
    margin-top: 4px;
}
.auth-form__radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    font-size: 13px;
    cursor: pointer;
}
.auth-form__radio input[type="radio"] {
    width: auto;
}
#country-select-group {
    margin-top: 12px;
    margin-bottom: 0;
}

/* ===========================
   利用規約モーダル（最後までスクロールしないと同意ボタンが押せない方式）
=========================== */
.auth-terms-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--color-primary);
    font-weight: 700;
    font-size: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.auth-terms-trigger:hover {
    opacity: 0.8;
}

.auth-form__group--checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.auth-terms-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-terms-modal-overlay.is-open {
    display: flex;
}

.auth-terms-modal {
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-terms-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.auth-terms-modal__header h2 {
    font-size: 15px;
    font-weight: 900;
    color: var(--color-text);
}
.auth-terms-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 2px 6px;
}
.auth-terms-modal__close:hover {
    color: var(--color-text);
}

.auth-terms-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text);
}
.auth-terms-modal__body h3 {
    font-size: 13px;
    font-weight: 900;
    margin: 18px 0 6px;
}
.auth-terms-modal__body h3:first-of-type {
    margin-top: 4px;
}
.auth-terms-modal__body p {
    margin-bottom: 8px;
}
.auth-terms-modal__draft-notice {
    background: #fff8e0;
    border: 1px solid #f0d98a;
    border-radius: 8px;
    padding: 10px 12px;
    color: #8a6a00;
    font-size: 12px;
    font-weight: 700;
}
.auth-terms-modal__text {
    white-space: pre-line;
}
.auth-terms-modal__end-marker {
    text-align: right;
    color: var(--color-text-light);
    margin-top: 16px;
}

.auth-terms-modal__footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}
.auth-terms-modal__footer .btn {
    flex: 1;
}
.auth-terms-modal__footer .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (max-width: 480px) {
    .auth-terms-modal {
        max-height: 86vh;
    }
    .auth-terms-modal__footer {
        flex-direction: column-reverse;
    }
}
