/* LinkTrip 予約画面ウィジェット実装技術仕様 - CSS */

:root {
    --primary-color: #a78bfa;
    --primary-dark: #9333ea;
    --secondary-color: #f9f9ff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #a78bfa;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e9e3ff;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --gradient-success: linear-gradient(135deg, var(--success-color), #059669);
    --gradient-warning: linear-gradient(135deg, var(--warning-color), #d97706);
    --gradient-info: linear-gradient(135deg, var(--info-color), var(--primary-dark));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    background: var(--bg-white);
    padding: 40px 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin: 20px 0 30px;
    border-left: 6px solid var(--primary-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.title-section {
    text-align: center;
}

.title-section h1 {
    font-size: 2.8em;
    color: var(--text-dark);
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 25px;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.primary {
    background: var(--gradient-primary);
    color: var(--bg-white);
}

.badge.secondary {
    background: var(--secondary-color);
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
}

.badge.success {
    background: var(--gradient-success);
    color: var(--bg-white);
}

/* メインコンテンツ */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* サイドバー目次 */
.toc {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.toc h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 12px;
}

.toc a {
    display: block;
    padding: 10px 15px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.toc a:hover,
.toc a.active {
    background: var(--secondary-color);
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* コンテンツ */
.content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
}

.content section {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
}

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

.content h2 {
    font-size: 2.2em;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content h3 {
    font-size: 1.6em;
    color: var(--text-dark);
    margin: 30px 0 20px;
}

.content h4 {
    font-size: 1.3em;
    color: var(--text-dark);
    margin: 25px 0 15px;
}

.content p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

.content ul, .content ol {
    color: var(--text-light);
    margin: 15px 0 15px 20px;
}

.content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* コードセクション */
.code-section {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-section h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.code-section pre {
    margin: 0;
    padding: 15px;
    background: #2d3748;
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.code-section code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* インテグレーションステップ */
.integration-step {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.integration-step:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.integration-step h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.2em;
}

.step-number {
    background: var(--primary-color);
    color: var(--bg-white);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    font-size: 0.9em;
}

/* イベントフロー */
.event-flow {
    background: var(--gradient-info);
    color: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 25px 0;
    box-shadow: var(--shadow-medium);
}

.event-flow h4 {
    color: var(--bg-white);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.event-flow p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

/* イベントデータ */
.event-data {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 15px 0;
}

.event-data h4 {
    color: #1976d2;
    margin-bottom: 10px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1.1em;
}

.event-data p {
    color: #424242;
    margin-bottom: 5px;
}

/* 警告・成功ボックス */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--warning-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 20px 0;
}

.warning-box h4 {
    color: #856404;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-box p {
    color: #856404;
    margin-bottom: 5px;
}

.success-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid var(--success-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 20px 0;
}

.success-box h4 {
    color: #155724;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-box p,
.success-box ul,
.success-box li {
    color: #155724;
}

/* 決済フロー */
.payment-flow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 25px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.payment-step {
    text-align: center;
    flex: 1;
    min-width: 150px;
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-light);
}

.payment-step h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.payment-step p {
    color: var(--text-light);
    font-size: 0.9em;
}

.payment-arrow {
    font-size: 24px;
    color: var(--text-muted);
    margin: 0 10px;
}

/* 設定テーブル */
.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.config-table th,
.config-table td {
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: left;
}

.config-table th {
    background: var(--secondary-color);
    color: var(--text-dark);
    font-weight: 600;
}

.config-table td {
    color: var(--text-light);
}

.config-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--text-dark);
}

.required {
    color: var(--danger-color);
    font-weight: bold;
}

.optional {
    color: var(--text-muted);
}

/* チェックリスト */
.checklist {
    margin: 20px 0;
}

.checklist h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.checklist ul {
    list-style: none;
    margin: 0;
}

.checklist li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.checklist li:last-child {
    border-bottom: none;
}

/* APIエンドポイント */
.api-endpoint {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 15px;
    font-family: 'Monaco', 'Courier New', monospace;
    margin: 8px 0;
    color: var(--text-dark);
    font-size: 0.9em;
}

/* フッター */
.footer {
    background: var(--bg-white);
    padding: 30px 0;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    margin-top: 40px;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 5px;
}

.version-info {
    font-size: 0.9em;
    color: var(--text-muted);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .toc {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 25px 15px;
        margin: 15px 0 20px;
    }

    .title-section h1 {
        font-size: 2.2em;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .content section {
        padding: 25px 20px;
    }

    .content h2 {
        font-size: 1.8em;
    }

    .payment-flow {
        flex-direction: column;
        gap: 20px;
    }

    .payment-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .badges {
        justify-content: center;
    }

    .toc {
        padding: 20px;
    }

    .integration-step {
        padding: 20px 15px;
    }

    .code-section {
        padding: 15px;
    }

    .code-section pre {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

    .content section {
        padding: 20px 15px;
    }

    .content h2 {
        font-size: 1.6em;
    }

    .content h3 {
        font-size: 1.3em;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }

    .config-table th,
    .config-table td {
        padding: 10px 8px;
        font-size: 0.9em;
    }
}