/* =================================================
   css/register.css
   会員登録ページ専用スタイル
   対象: page-register.php
   login.css・contact.css のパターンに準拠
   ================================================= */

:root {
    --rf-border:        #ddd;
    --rf-border-focus:  var(--color-main, #219cd8);
    --rf-error:         #c0392b;
    --rf-error-bg:      #fdf2f2;
    --rf-label:         #222;
    --rf-hint:          #888;
    --rf-required-bg:   #fde8e8;
    --rf-required-col:  #c0392b;
    --rf-input-bg:      var(--color-white, #fff);
    --rf-radius:        4px;
    --rf-focus-shadow:  0 0 0 3px rgba(33,156,216,0.15);
    --rf-card-shadow:   0 2px 16px rgba(0,0,0,0.08);
}


/* =========================================
   ページレイアウト（login.css に準拠）
   ========================================= */
.register-page {
    min-height: calc(100vh - 120px);
    padding: 60px 20px 80px;
    background: var(--color-bg, #f8f8f8);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.register-page-wrapper {
    width: 100%;
    max-width: 520px;
}


/* =========================================
   カード
   ========================================= */
.register-card {
    background: var(--color-white, #fff);
    border-radius: 8px;
    box-shadow: var(--rf-card-shadow);
    padding: 40px 40px 36px;
}

.register-card__logo {
    text-align: center;
    margin-bottom: 24px;
}

.register-card__logo img {
    height: 36px;
    width: auto;
}

.register-card__title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: .04em;
}

.register-card__desc {
    font-size: 13px;
    color: var(--rf-hint);
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.7;
}


/* =========================================
   フォーム
   ========================================= */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* =========================================
   フィールド共通
   ========================================= */
.rf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rf-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--rf-label);
}

.rf-required {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: .03em;
    background: var(--rf-required-bg);
    color: var(--rf-required-col);
}

.rf-hint {
    font-size: 12px;
    color: var(--rf-hint);
    line-height: 1.7;
    margin: 0;
}


/* =========================================
   テキスト入力
   ========================================= */
.rf-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 15px;
    font-family: 'Shippori Mincho', serif;
    color: #333;
    background: var(--rf-input-bg);
    border: 1.5px solid var(--rf-border);
    border-radius: var(--rf-radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.6;
}

.rf-input::placeholder { color: #bbb; }

.rf-input:focus {
    outline: none;
    border-color: var(--rf-border-focus);
    box-shadow: var(--rf-focus-shadow);
}

.rf-input.is-error {
    border-color: var(--rf-error);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}


/* =========================================
   パスワード表示切り替え（login.css に準拠）
   ========================================= */
.rf-password-wrap {
    position: relative;
}

.rf-password-wrap .rf-input {
    padding-right: 46px;
}

.rf-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.rf-toggle-pw:hover { color: var(--color-main, #219cd8); }

.rf-eye--hide { display: none; }
.rf-toggle-pw[aria-pressed="true"] .rf-eye--show { display: none; }
.rf-toggle-pw[aria-pressed="true"] .rf-eye--hide { display: block; }


/* =========================================
   インラインエラー
   ========================================= */
.rf-error {
    font-size: 12px;
    color: var(--rf-error);
    min-height: 1.2em;
    display: block;
    line-height: 1.5;
}


/* =========================================
   利用規約ボックス
   ========================================= */
.rf-field--agree {
    gap: 12px;
}

.rf-agree-box {
    border: 1.5px solid var(--rf-border);
    border-radius: var(--rf-radius);
    overflow: hidden;
}

.rf-agree-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--color-bg, #f8f8f8);
    border-bottom: 1px solid var(--rf-border);
}

.rf-agree-box__title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.rf-agree-box__link {
    font-size: 12px;
    color: var(--color-main, #219cd8);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rf-agree-box__body {
    height: 180px;
    overflow-y: auto;
    padding: 16px;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
    background: #fff;
    /* スクロールバーを目立たせる */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.rf-agree-box__body::-webkit-scrollbar { width: 6px; }
.rf-agree-box__body::-webkit-scrollbar-track { background: transparent; }
.rf-agree-box__body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* 利用規約本文の見出し・段落調整 */
.rf-agree-box__body h1,
.rf-agree-box__body h2,
.rf-agree-box__body h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 12px 0 4px;
}

.rf-agree-box__body p { margin: 0 0 8px; }
.rf-agree-box__body ul,
.rf-agree-box__body ol {
    padding-left: 1.4em;
    margin: 0 0 8px;
}


/* =========================================
   チェックボックス（login.css に準拠）
   ========================================= */
.rf-field--check,
.rf-field--agree .rf-check-label {
    flex-direction: row;
    align-items: center;
}

.rf-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    line-height: 1.5;
    user-select: none;
    flex-wrap: wrap;
}

.rf-check-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rf-check-box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--rf-border);
    border-radius: 3px;
    background: #fff;
    display: grid;
    place-items: center;
    transition: background .15s, border-color .15s;
}

.rf-check-label input:checked + .rf-check-box {
    background: var(--color-main, #219cd8);
    border-color: var(--color-main, #219cd8);
}

.rf-check-label input:checked + .rf-check-box::after {
    content: '';
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.rf-check-label input:focus + .rf-check-box {
    box-shadow: var(--rf-focus-shadow);
}

.rf-check-label a {
    color: var(--color-main, #219cd8);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rf-check-label .rf-required {
    margin-left: 2px;
}


/* =========================================
   送信ボタン（login.css に準拠）
   ========================================= */
.rf-submit-wrap {
    padding-top: 4px;
}

.rf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--color-main, #219cd8);
    color: #fff;
    border: none;
    border-radius: var(--rf-radius);
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Shippori Mincho', serif;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.rf-submit:hover:not(:disabled) {
    background: var(--color-main-dark, #1a7dac);
    transform: translateY(-1px);
}

.rf-submit:active:not(:disabled) { transform: translateY(0); }

.rf-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.rf-submit__loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
}

.rf-submit.is-loading .rf-submit__text { opacity: .7; }
.rf-submit.is-loading .rf-submit__loader {
    display: block;
    animation: rfSpin .7s linear infinite;
}

@keyframes rfSpin { to { transform: rotate(360deg); } }


/* =========================================
   ログイン誘導
   ========================================= */
.register-card__login {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    text-align: center;
}

.register-card__login p {
    font-size: 13px;
    color: var(--rf-hint);
    margin: 0 0 10px;
}

.register-card__login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-main, #219cd8);
    text-decoration: none;
    transition: color 0.2s, gap 0.2s;
}

.register-card__login-link:hover {
    color: var(--color-main-dark, #1a7dac);
    gap: 9px;
}


/* =========================================
   レスポンシブ
   ========================================= */
@media (max-width: 767px) {
    .register-page {
        padding: 32px 16px 60px;
    }

    .register-card {
        padding: 28px 20px 24px;
    }

    .register-card__title { font-size: 20px; }

    .rf-agree-box__body { height: 140px; }
}
