/* 剣道コネクト カスタムCSS */

/* =========================== */
/* CSS変数による色管理システム    */
/* =========================== */
:root {
  /* メインカラーパレット */
  --color-kendo-primary: #1e3a8a;
  --color-kendo-primary-dark: #1e40af;
  --color-kendo-primary-light: #3b82f6;
  
  /* セカンダリカラー */
  --color-kendo-secondary: #374151;
  --color-kendo-secondary-light: #6b7280;
  
  /* アクセントカラー */
  --color-kendo-accent: #dc2626;
  --color-kendo-accent-gold: #f59e0b;
  --color-kendo-accent-green: #10b981;
  
  /* 背景色 */
  --color-kendo-bg-primary: #f8fafc;
  --color-kendo-bg-secondary: #f1f5f9;
  --color-kendo-bg-card: #ffffff;
  
  /* ボーダー色 */
  --color-kendo-border: #e2e8f0;
  --color-kendo-border-focus: #1e3a8a;
  
  /* テキスト色 */
  --color-kendo-text-primary: #1f2937;
  --color-kendo-text-secondary: #6b7280;
  --color-kendo-text-muted: #9ca3af;
  
  /* シャドウ */
  --shadow-kendo: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-kendo-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  
  /* スペーシング */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* ボーダー半径 */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-full: 9999px;
  
  /* トランジション */
  --transition-fast: all 0.2s ease;
  --transition-medium: all 0.3s ease;
}

/* 和風テイストの追加スタイル */
.kendo-pattern {
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(30, 58, 138, 0.1) 1px, transparent 0);
    background-size: 20px 20px;
}

/* プログレスバー（ウィザード用） */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e5e7eb;
    z-index: 1;
}

.progress-step {
    position: relative;
    background-color: #e5e7eb;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-step.active {
    background-color: var(--color-kendo-primary);
    color: white;
}

.progress-step.completed {
    background-color: var(--color-kendo-accent-green);
    color: white;
}

/* ボタンスタイル */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 44px; /* タッチ操作最適化 */
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-kendo-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-kendo-primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--color-kendo-bg-primary);
    color: var(--color-kendo-secondary);
    border: 1px solid var(--color-kendo-border);
}

.btn-secondary:hover {
    background-color: var(--color-kendo-bg-secondary);
}

/* ボタン内アイコンのスタイル */
.btn-primary svg {
    stroke: white;
    fill: none;
}

.btn-secondary svg {
    stroke: currentColor;
    fill: none;
}

/* カードスタイル */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* フォームスタイル */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    min-height: 44px; /* タッチ操作最適化 */
}

.form-input:focus {
    outline: none;
    border-color: var(--color-kendo-border-focus);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* 入力欄カーソル視認性改善 */
input[type="text"], 
input[type="email"], 
input[type="number"],
textarea {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="number"]:focus,
textarea:focus {
    padding-left: 12px !important;
    box-shadow: 0 0 0 1px #1e3a8a, 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

/* エラー・成功メッセージ */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ローディング表示 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3a8a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* HTMX専用のスタイル */
.htmx-indicator {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* モバイル最適化 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* 和風装飾要素 */
.kendo-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #1e3a8a, transparent);
    margin: 2rem 0;
}

/* 段位バッジ */
.rank-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--color-kendo-primary);
    color: white;
}

/* 評価星 */
.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #fbbf24;
    font-size: 1.25rem;
}

.star.empty {
    color: #e5e7eb;
}

/* 検索結果テキスト切り詰め */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 検索フィルター */
.search-filters {
    background: linear-gradient(135deg, var(--color-kendo-bg-primary) 0%, white 100%);
    border: 1px solid var(--color-kendo-border);
}

/* 検索結果カード */
.instructor-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-kendo);
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.instructor-card:hover {
    box-shadow: var(--shadow-kendo-hover);
    border-color: var(--color-kendo-primary-light);
    transform: translateY(-2px);
}