/**
 * Auth Register Fix
 * 新規登録ページのレイアウト問題を修正
 */

/* 認証カードの高さ制限を解除 */
.auth-card {
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
}

/* フォームステップの高さ制限を解除 */
.form-step {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* ステップ4,5の特別な高さ設定を無効化 */
.form-step[data-step="4"].active,
.form-step[data-step="5"].active {
    height: auto !important;
    padding-bottom: 20px !important;
}

/* フォームナビゲーションの固定位置を解除 */
.form-step[data-step="4"] .form-navigation,
.form-step[data-step="5"] .form-navigation {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 40px !important;
}

/* 認証コンテナのパディング調整 */
.auth-container {
    padding: 40px 20px !important;
    min-height: auto !important;
}

/* 進捗インジケーターのマージン調整 */
.registration-progress {
    margin: 30px auto !important;
    max-width: 100% !important;
    padding: 0 15px !important;
}

/* チャレンジセクションのレイアウト改善 */
.challenges-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px !important;
}

/* チャレンジグループのスタイル調整 */
.challenge-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

/* スキル・興味セクションのコンテナ修正 */
.skills-selection-container,
.interests-selection-container {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

/* カテゴリーセクションのマージン調整 */
.skill-category-section,
.interest-category-section {
    margin-bottom: 30px !important;
}

/* チェックボックスグリッドの改善 */
.skills-checkbox-grid,
.interests-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

/* フォームグループのマージン調整 */
.form-group {
    margin-bottom: 20px !important;
}

/* テキストエリアの高さ調整 */
textarea {
    min-height: 100px !important;
    resize: vertical;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px !important;
        margin: 20px 10px !important;
    }
    
    .challenges-section {
        gap: 20px;
    }
    
    .challenge-group {
        padding: 15px;
    }
    
    .skills-checkbox-grid,
    .interests-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .registration-progress {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    /* プログレスステップの最小幅 */
    .progress-step {
        min-width: 60px;
    }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
    .challenges-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-checkbox-grid,
    .interests-checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* デスクトップ対応 */
@media (min-width: 1025px) {
    .challenges-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-card:has(.form-step[data-step="2"].active) {
        max-width: 900px !important;
    }
}

/* スクロールバーのスタイル */
.auth-card::-webkit-scrollbar {
    width: 8px;
}

.auth-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.auth-card::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.auth-card::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ボタンの一貫性 */
.auth-button,
.auth-button-outline {
    width: 100%;
    margin-top: 10px;
}

.form-navigation {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.form-navigation button {
    flex: 1;
}