/* LickCalc Help Documentation Styles */

body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.help-header {
    background: linear-gradient(135deg, #007bff, #17a2b8);
    color: white;
    padding: 30px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.help-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
}

.help-header p {
    margin: 0;
    font-size: 1rem;
}

.help-layout {
    display: flex;
    min-height: calc(100vh - 120px);
}

.sidebar {
    position: sticky;
    top: 120px;
    width: 280px;
    height: calc(100vh - 140px);
    background-color: white;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    flex-shrink: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.sidebar-content {
    padding: 20px;
}

.sidebar h3 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    color: #343a40;
}

.sidebar ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.sidebar li {
    margin: 0;
}

.sidebar a {
    display: block;
    text-decoration: none;
    color: #495057;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sidebar a:hover {
    background-color: #e3f2fd;
    color: #007bff;
    padding-left: 16px;
}

.sidebar a.active {
    background-color: #007bff;
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px 40px;
    max-width: 900px;
    overflow-y: auto;
}

.section-header {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    scroll-margin-top: 140px;
}

section {
    margin-bottom: 60px;
}

.card {
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-header {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-radius: 8px 8px 0 0 !important;
}

.parameter-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.parameter-box h6 {
    margin-top: 0;
    color: #1565c0;
}

.code-block {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    margin: 10px 0;
    overflow-x: auto;
    white-space: pre;
    word-break: normal;
    max-width: 100%;
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.tip-box {
    background-color: #d1edff;
    border-left: 4px solid #0dcaf0;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.footer {
    background-color: #343a40;
    color: white;
    padding: 30px 40px;
    text-align: center;
}

.footer p {
    margin: 5px 0;
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

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

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .help-layout {
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    .main-content {
        padding: 20px;
    }
}

/* References styling */
.citation {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.citation:hover {
    text-decoration: underline;
}

.references {
    list-style: none;
    counter-reset: ref-counter;
    padding-left: 2em;
}

.references li {
    counter-increment: ref-counter;
    margin-bottom: 1em;
    position: relative;
}

.references li::before {
    content: "[" counter(ref-counter) "]";
    position: absolute;
    left: -2em;
    font-weight: bold;
    color: #666;
}

.back-ref {
    margin-left: 0.5em;
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
}

.back-ref:hover {
    color: #007bff;
}

sup a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
}

sup a:hover {
    text-decoration: underline;
}

pre, code {
  white-space: pre;
  overflow-x: auto;
  word-break: normal;
  max-width: 100%;
}