/**
 * picoKit - 回答画面CSS
 * メインカラー: #0097d3
 */

/* ============================================
   リセット・ベース
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   ヘッダー
   ============================================ */
.page-header {
    background: linear-gradient(135deg, #0097d3 0%, #0078a8 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.page-header .subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ============================================
   コンテナ
   ============================================ */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   カード
   ============================================ */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #333;
}

.card-body {
    padding: 20px;
}

/* ============================================
   イベント情報
   ============================================ */
.event-info {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-info h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 8px;
}

.event-info .description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.event-info .meta {
    font-size: 0.85rem;
    color: #888;
}

.event-info .meta span {
    margin-right: 16px;
}

/* ============================================
   回答フォーム
   ============================================ */
.response-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 16px;
}

/* 名前入力 */
.name-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.name-input:focus {
    outline: none;
    border-color: #0097d3;
}

/* ============================================
   候補日リスト
   ============================================ */
.candidate-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.candidate-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 10px;
    gap: 12px;
}

.candidate-date {
    flex: 1;
}

.candidate-date .date {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.candidate-date .time {
    font-size: 0.85rem;
    color: #888;
    margin-top: 2px;
}

/* ============================================
   回答ボタン
   ============================================ */
.answer-buttons {
    display: flex;
    gap: 8px;
}

.answer-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-btn:hover {
    transform: scale(1.1);
}

.answer-btn.selected {
    border-width: 3px;
}

.answer-btn.ok {
    color: #4CAF50;
}

.answer-btn.ok.selected {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.answer-btn.maybe {
    color: #FF9800;
}

.answer-btn.maybe.selected {
    background: #FF9800;
    border-color: #FF9800;
    color: white;
}

.answer-btn.ng {
    color: #f44336;
}

.answer-btn.ng.selected {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

/* ============================================
   送信ボタン
   ============================================ */
.submit-section {
    padding: 20px;
    background: #f9f9f9;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0097d3 0%, #0078a8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 151, 211, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   回答済み表示
   ============================================ */
.already-answered {
    background: #e1f5fe;
    border: 1px solid #b3e5fc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
    color: #0277bd;
}

/* ============================================
   完了画面
   ============================================ */
.complete-page {
    text-align: center;
    padding: 60px 20px;
}

.complete-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.complete-page h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 12px;
}

.complete-page p {
    color: #666;
    margin-bottom: 24px;
}

/* ============================================
   集計表示
   ============================================ */
.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.summary-table th {
    font-weight: 500;
    color: #888;
    font-size: 0.85rem;
}

.summary-count {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
}

.summary-count .ok { color: #4CAF50; }
.summary-count .maybe { color: #FF9800; }
.summary-count .ng { color: #f44336; }

/* ============================================
   エラー・メッセージ
   ============================================ */
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page .error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-page h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 12px;
}

.error-page p {
    color: #888;
}

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-info {
    background: #e1f5fe;
    color: #0277bd;
    border: 1px solid #b3e5fc;
}

/* ============================================
   確定表示
   ============================================ */
.decided-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 12px;
}

.decided-banner h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    opacity: 0.9;
}

.decided-banner .date {
    font-size: 1.4rem;
    font-weight: bold;
}

.decided-banner .time {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 4px;
}

/* ============================================
   締切表示
   ============================================ */
.closed-banner {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 12px;
    color: #666;
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .candidate-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .answer-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .answer-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
}
