/* 
 * 相続シミュレーションシステム マニュアル用スタイルシート
 * 
 * このファイルがソースです。編集はこのファイルで行ってください。
 * build-manual.js によって src/main/resources/static/manual/assets/ にコピーされます。
 */

/* Body Padding */
body {
    padding-top: 0;
}

/* Manual Styling */
.manual-content h1 {
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.manual-content h2 {
    color: #34495e;
    margin-top: 40px;
    margin-bottom: 20px;
}

.manual-content h3 {
    color: #7f8c8d;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* リリースノート カードヘッダー内のh3を白色に */
.card-header h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 0;
}

.manual-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.manual-content code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.manual-content pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.manual-content blockquote {
    border-left: 4px solid #e74c3c;
    padding-left: 20px;
    margin: 20px 0;
    background-color: #fdf2f2;
    padding: 15px 20px;
    border-radius: 5px;
}

.manual-content table {
    width: 100%;
    margin: 20px 0;
}

.manual-content table th {
    background-color: #3498db;
    color: white;
    padding: 12px;
}

.manual-content table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.manual-content .alert {
    margin: 20px 0;
}

/* TOC Styling */
.toc-sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

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

.toc a {
    text-decoration: none;
    color: #495057;
    font-size: 0.9em;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc a:hover {
    background-color: #e7f3ff;
    color: #0d6efd;
    border-left-color: #0d6efd;
    -webkit-transform: translateX(4px);
    -ms-transform: translateX(4px);
    transform: translateX(4px);
}

.toc a.active {
    background-color: #0d6efd !important;
    color: white !important;
    font-weight: 600;
    border-left-color: #0a58ca;
    -webkit-box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    -moz-box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: bold;
    font-size: 1.1rem;
}

.navbar-text {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    padding-left: 1rem;
    margin-left: 1rem;
}

.dropdown-menu {
    border-radius: 8px;
    -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.dropdown-header {
    color: #0d6efd;
    font-weight: bold;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9em;
}

.dropdown-item:hover {
    background-color: #e7f3ff;
    color: #0d6efd;
}

/* Smooth scroll behavior - will be handled by JS for better compatibility */
html {
    scroll-behavior: smooth;
}

/* Heading highlight on target */
.manual-content h2:target,
.manual-content h3:target {
    -webkit-animation: highlightHeading 2s ease;
    -moz-animation: highlightHeading 2s ease;
    -o-animation: highlightHeading 2s ease;
    animation: highlightHeading 2s ease;
    scroll-margin-top: 72px;
    -webkit-scroll-margin-top: 72px;
}

@-webkit-keyframes highlightHeading {
    0% {
        background-color: rgba(13, 110, 253, 0.2);
        -webkit-transform: scale(1.02);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

@keyframes highlightHeading {
    0% {
        background-color: rgba(13, 110, 253, 0.2);
        -webkit-transform: scale(1.02);
        -ms-transform: scale(1.02);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }
}

/* Custom scrollbar for modern browsers */
.toc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 10px;
}

.toc-sidebar::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Firefox scrollbar */
.toc-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f1f1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toc-sidebar {
        margin-top: 30px;
        position: static !important;
    }
}

/* Print styles */
@media print {
    .navbar, .toc-sidebar, footer {
        display: none;
    }
    
    .manual-content {
        max-width: none;
    }
}
