/* register.css */

/* 基本設定 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* メインコンテナ */

.register-container {
    margin-top: 32px;
    max-width: 100%;
}

.register-form {
    max-width: 640px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* ページタイトル */
.page-title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

/* フォームタイトル */
.form-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--MSTblue);
    ;
}

/* アラート・通知 - 共通コンポーネントに移行済み */

.notice-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 0 auto;   /* 横方向の中央寄せ */
    margin-top: 25px;
    margin-bottom: 25px;
    color: #8d6f15;
    font-size: 14px;
    line-height: 2.0;
    max-width: 640px;
}

/* フォーム要素 - 共通コンポーネントに移行済み */
/* 登録画面固有のスタイルのみ残す */

/* 小さい入力フィールド（郵便番号など） */
.postal-input {
    max-width: 150px;
}

/* 2列レイアウト用（姓名、フリガナ） */
.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-label {
    min-width: 180px;
    flex-shrink: 0;
}

.form-row .form-input-group {
    display: flex;
    gap: 15px;
    flex: 1;
}

.form-row .form-input-group .form-input {
    flex: 1;
    max-width: 180px;
}

/* 入力不可フォーム */
.form-disable {
    background-color: #eee;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.checkbox-group .form-label {
    min-width: 180px;
    flex-shrink: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.form-checkbox {
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* フォーム備考 */
.form-note {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

/* エラーメッセージ */
.register-field-error {
    color: #F00;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}


/* フォームアクション */
.form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* ボタン間の間隔を追加 */
}

/* 確認ボタン - 共通コンポーネントのbtnクラスを使用 */
.confirm-button {
    /* 共通コンポーネントのbtn--primaryを使用 */
    background-color: var(--btn-primary);
    border-color: var(--btn-primary);
    color: white;
    margin: 16px;
    padding: 16px 16px;
    width: 50%;
    min-width: 140px;
    box-shadow: 0 4px 12px #CCC;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.5px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-button:hover {
    background-color: #7A4FA8;
    border-color: #7A4FA8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(139, 94, 191, 0.3);
}

.confirm-button.gray {
    /* 共通コンポーネントのbtn--secondaryを使用 */
    background-color: var(--btn-secondary);
    border-color: var(--btn-secondary);
    color: white;
}

.confirm-button.gray:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}



/* ========================================
   確認画面（confirm）スタイル
   ======================================== */
.confirm-content {
    max-width: 640px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.confirm-content > p {
    font-size: 16px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}

.confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
}

.confirm-table th {
    text-align: left;
    padding: 14px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    width: 180px;
    vertical-align: top;
}

.confirm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
    font-size: 14px;
    word-break: break-word;
}

.confirm-table tr:last-child th,
.confirm-table tr:last-child td {
    border-bottom: none;
}

/* ========================================
   完了画面（mail-sent）スタイル
   ======================================== */
.mail-sent-container {
    max-width: 100%;
}

.mail-sent-content {
    max-width: 640px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.mail-sent-content > p {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.8;
}

.mail-sent-content > p strong {
    color: var(--MSTblue);
    font-size: 18px;
    display: block;
    margin-top: 10px;
}

.mail-sent-content .notice-box {
    margin: 30px 0;
}

.mail-sent-content .notice-box h3 {
    font-size: 16px;
    color: #856404;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.mail-sent-content .notice-box ul {
    margin: 0;
    padding-left: 25px;
}

.mail-sent-content .notice-box li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.mail-sent-actions {
    text-align: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mail-sent-actions a {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-link {
    background: linear-gradient(135deg, var(--MSTblue) 0%, var(--MSTblue) 100%);
    color: white !important;
}

.home-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-link {
    background: #6c757d;
    color: white !important;
}

.back-link:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   エラー画面スタイル
   ======================================== */
.error-container {
    max-width: 100%;
}

.error-content {
    max-width: 640px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    color: #721c24;
    font-size: 16px;
    text-align: center;
}

.error-actions {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.error-actions a {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.register-link {
    background: #6c757d;
    color: white !important;
}

.register-link:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .register-container {
        margin: 10px;
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .postal-input {
        max-width: 100%;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .confirm-content,
    .mail-sent-content,
    .error-content {
        padding: 25px;
    }
    
    .confirm-table th {
        width: 120px;
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .confirm-table td {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .register-container {
        padding: 15px;
    }
    
    .form-input,
    .form-select {
        font-size: 16px; /* iOS zoom防止 */
    }
    
    .confirm-button {
        width: 100%;
        padding: 14px;
    }
    
    .confirm-content,
    .mail-sent-content,
    .error-content {
        padding: 20px;
    }
    
    .confirm-table {
        display: block;
    }
    
    .confirm-table tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 15px;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 15px;
    }
    
    .confirm-table tr:last-child {
        border-bottom: none;
    }
    
    .confirm-table th,
    .confirm-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border: none;
    }
    
    .confirm-table th {
        background: transparent;
        font-weight: 600;
        color: #666;
        font-size: 12px;
    }
    
    .confirm-table td {
        font-size: 14px;
        color: #333;
        padding-top: 4px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px; /* モバイルでも適切な間隔を確保 */
    }
    
    .form-actions form {
        width: 100%;
    }
    
    .confirm-button {
        margin: 8px 0;
    }
}