/*
======================
Table of Contents
======================
1. CSS Variables & Reset
2. Base Styles
3. Layout & Grid
4. Navigation & Sidebar
5. Header Styles
6. Content Sections
7. Form & Interactive Elements
8. Tables
9. Alerts & Messages
10. Cards & Panels
11. Utility Classes
12. Media Queries
13. Print Styles
14. Custom Scrollbars
15. Footer Styles
16. Additional Utility Styles
17. Alert Links & Additional Styles
18. Resolution Badge
19. Delivery Method
20. Naming Conventions
21. Tabs Styling
22. PDF Download Button Styles
*/

/* ======================
1. CSS Variables & Reset
====================== */
@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-ThinItalic.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-Medium.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geograph';
    src: url('../fonts/Geograph/Geograph-BlackItalic.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}


:root {
    --primary-font: 'Geograph', sans-serif;
    --secondary-font: 'Open Sans', sans-serif;
    --font-thin: 100;
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-bold: 700;
    --font-black: 900;
    --primary-color: #ffcc22;
    --primary-light-color: #fedc6b;
    --secondary-color: #333;
    --text-color: #2c3e50;
    --border-color: #e0e0e0;
    --warning-color: #ff6b6b;
    --info-color: #3c89fd;
    --danger-color: #f83a4d;
    --light-bg: #f4f4f4;
    --text-muted: #6c757d;
}

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

/* ======================
2. Base Styles
====================== */
body {
    font-family: var(--primary-font);
    font-weight: var(--font-regular);
    line-height: 1.6;
    color: var(--text-color);
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

ul {
    line-height: 2rem;
    padding-left: 2rem;
}

/* ======================
3. Layout & Grid
====================== */
.container {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: calc(100vh - 120px);
    position: relative;
    transition: all 0.3s ease;
}

.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}


/* ======================
4. Navigation & Sidebar
====================== */
/* Sidebar Base */
.sidebar {
    width: 100%;
    max-width: 300px;
    background: white;
    padding: 1rem;
    border-radius: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: -100%;
    height: 100%;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.active {
    left: 0;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-weight: var(--font-medium);
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Close Button */
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.sidebar.active .sidebar-close {
    display: block;
}

.sidebar-close:hover {
    transform: scale(1.1);
}

/* Navigation Accordion */
.nav-accordion {
    padding: 0.5rem;
}

.accordion-item {
    margin-bottom: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

/* Accordion Buttons */
.accordion-button {
    width: 100%;
    padding: 1rem;
    background: white;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--secondary-color);
    transition: background-color 0.2s ease;
    position: relative;
    /* Required for positioning the tooltip */
}

.accordion-button span {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

/* Tooltip Arrow */
.accordion-button::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% - 4px);
    /* Slightly overlap the button */
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--secondary-color) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
}

.accordion-button::after {
    content: "test content!!!" !important;
    /* Add this temporarily to debug */
    /* Use the tooltip text from the data attribute */
    position: absolute;
    left: 50%;
    bottom: 120%;
    /* Position above the button */
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--secondary-color);
    /* Tooltip background color */
    color: white;
    /* Tooltip text color */
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    /* Prevent interfering with hover states */
    z-index: 1000;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Show Tooltip on Hover */
.accordion-button:hover::after,
.accordion-button:hover::before {
    opacity: 1;
    visibility: visible;
}

.accordion-button:hover {
    background-color: var(--light-bg);
}

.accordion-button span {
    flex: 1;
}

/* Chevron Animation */
.accordion-button .chevron {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-button .chevron {
    transform: rotate(180deg);
}

/* Accordion Content */
.accordion-content {
    /* max-height: 0; */
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: var(--light-bg);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

/* Sub-accordion styles - matching main accordion appearance */
.sub-accordion {
    margin: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background: white;
    margin-left: 1rem;
    margin-right: 1rem;
}

.sub-accordion-button {
    width: 100%;
    padding: 1rem;
    background: white;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--secondary-color);
    transition: background-color 0.2s ease;
}

.sub-accordion-button:hover {
    background-color: var(--light-bg);
}

.sub-accordion-button span {
    flex: 1;
    font-size: 1rem;
}

.sub-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: var(--light-bg);
}

/* Show sub-accordion content when active */
.sub-accordion.active .sub-accordion-content {
    /* max-height: 500px; */
    padding: 0.5rem 0;
    max-height: none;
}

/* Rotate chevron when active */
.sub-accordion.active .sub-accordion-button .chevron {
    transform: rotate(180deg);
}

.sub-accordion-content[hidden] {
    display: none;
}

/* Style nav links in sub-accordions consistently */
.sub-accordion .nav-list {
    list-style: none;
    padding: 0.5rem 1rem;
    margin: 0;
}

.sub-accordion .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sub-accordion .nav-link:hover {
    background-color: rgba(255, 204, 0, 0.1);
    color: var(--secondary-color);
    padding-left: 1.25rem;
}

/* Tooltip Styles */
.tooltip {
    position: fixed;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    white-space: nowrap;
}

/* Navigation Links */
.nav-list {
    list-style: none;
    padding: 0.5rem 1rem;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover {
    background-color: rgba(255, 204, 0, 0.1);
    color: var(--secondary-color);
    padding-left: 1.25rem;
}

/* Nav Special (Welcome and Change Log) */
.nav-special {
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-special .nav-list {
    padding: 0;
    margin: 0;
}

.nav-special .nav-list li {
    margin-bottom: 0.5rem;
}

.nav-special .nav-list li:last-child {
    margin-bottom: 0;
}

.nav-special .nav-link {
    display: block;
    text-align: left;
    font-weight: 500;
    color: var(--secondary-color);
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem 1rem;
}

.nav-special .nav-link:hover {
    background-color: rgba(255, 204, 0, 0.2);
    padding-left: 1.25rem;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1001;
    padding: 0.75rem;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
    display: block;
}

.nav-toggle:hover {
    background-color: #e6b800;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ======================
5. Header Styles
====================== */
.header {
    background: linear-gradient(45deg, #000 0%, #333 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content a {
    color: white;
    text-decoration: none;
    width: 100%;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

/* First row - Logo and main title */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.logo {
    height: 80px;
    /* Set fixed height to match the two h1s */
    width: auto;
    object-fit: contain;
    /* Ensures the logo maintains its aspect ratio */
}

.main-title {
    display: flex;
    flex-direction: column;
    margin: 0;
    justify-content: center;
    /* Centers the text vertically */
}

.main-title h1 {
    font-weight: var(--font-medium);
    margin: 0;
    line-height: 1;
    font-size: 2rem;
}

/* Second row - Subtitle and version */
.header-titles {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    /* Full width alignment */
}

.header-titles h2 {
    font-weight: var(--font-medium);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.header-titles h3 {
    font-weight: var(--font-light);
    font-size: 1rem;
    color: #cccccc;
    margin: 0;
    line-height: 1.2;
}

/* ======================
6. Content Sections
====================== */
.section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.section-title {
    font-weight: var(--font-bold);
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.subsection {
    margin: 1.5rem 0;
}


.subsection h4 {
    /* padding-left: 1.5rem; */
}

.subsection h5 {
    padding-left: 1.5rem;
}

.subsection-title {
    font-weight: var(--font-medium);
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.subsection-content {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.subsection-content ul {
    padding-left: 1.5rem;
}

/* ======================
7. Form & Interactive Elements
====================== */
/* Requirements Section */
.requirements-section {
    display: grid;
    gap: 1.5rem;
    margin: 1rem;
}

.requirement-block {
    background: var(--light-bg);
    padding: 1rem 2rem;
    margin: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.requirement-block h3 {
    margin: 0.5rem 0.5rem;
}

.requirement-block h4 {
    margin: 0.5rem 1rem;
    padding-left: 0rem;
}

.requirement-block ol {
    margin: 1rem 2rem;
}

.requirement-text {
    margin-left: 1rem;
}

.requirements-title {
    flex: 1 1 auto;
    align-items: center;
    gap: 1rem;
    margin: 1rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid var(--primary-color);
    min-width: 0;
}

.requirements-badge-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1rem;
    width: 100%;

}

.requirements-title h2 {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
}

.requirement-list {
    margin: 0;
    padding-left: 1.5rem;
}

.requirement-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.requirement-block ul {
    padding-left: 2rem;
}

.requirement-block p {
    padding: 0 0.5rem;
}

.note {
    font-size: 0.9rem;
    color: #2d2d2d;
    font-style: italic;
    margin: 0.3rem 1rem;
}

/* ======================
8. Tables
====================== */

table th {
    font-weight: var(--font-medium);
}

.table-container {
    max-width: 900px;
    margin: 1rem auto;
    padding: 10px;
    background-color: #fff;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    border-radius: 8px;
}

.table-container h4 {
    margin-top: 1rem;
}

.table-container li {
    margin-left: 1rem;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    margin: 1rem 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

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

.table-responsive th {
    background-color: var(--light-bg);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.table-responsive tr:not(th):hover {
    background-color: var(--light-bg);
    transition: background-color 0.2s ease;
}

.table-title {
    font-size: 1.2rem;
    font-weight: var(--font-medium);
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.table-text-muted {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ======================
9. Alerts & Messages
====================== */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin: 1rem;
    width: 80%;
}

.alert h3 {
    font-weight: var(--font-bold);
}

.alert-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.alert-badge {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 0.5rem;
    flex-shrink: 0;
}

.alert-text-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert-text {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.alert-info {
    background: var(--info-color);
    color: white;
}

.alert-warning {
    background: var(--warning-color);
    color: white;
}

.alert-danger {
    background: var(--danger-color);
    color: white;
}


/* ======================
10. Cards & Panels
====================== */
.change-log {
    border-radius: 4px;
}

.change-log h3 {
    margin-left: 1rem;
}

.visual-reference {
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
    padding: 1rem;
    margin: 1rem;
    width: auto;
    overflow-x: auto;
}

.visual-reference img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
}

.delivery-method {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 1rem;
    margin: 1rem;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.delivery-method:hover {
    background: #e7e7e7;
    transform: translateY(-2px);
    box-shadow: 0 4px 4px var(--primary-light-color);
    text-decoration: none;
    color: inherit;
}

/* ======================
11. Utility Classes
====================== */
.highlight-yellow {
    background-color: var(--primary-color);
    padding: 0.2rem 0.2rem;
}

.highlight-green {
    background-color: lightgreen;
    padding: 0.2rem 0.2rem;
}

.highlight-red {
    background-color: rgb(242, 178, 178);
    padding: 0.2rem 0.5rem;
    margin: 0 0 0 0.5rem;
}

.filename-key {
    font-weight: 600;
    padding: 0.2rem 0.2rem;
    margin-top: 0.5rem;

}

/* ======================
12. Media Queries
====================== */
@media (max-width: 480px) {
    .delivery-badge {
        flex-direction: column;
        align-items: flex-start;
    }

    .requirement-block ul {
        padding: 0.5rem 0 0.5rem 2rem;
        margin: 0.5rem;
        overflow-x: auto;
        list-style-position: outside;
    }

    .logo {
        height: 60px;
    }

    .main-title h1 {
        font-size: 1.5rem;
    }

    .header-titles h2 {
        font-size: 1rem;
    }

    .requirement-list {
        margin: 0;
        padding-left: 2rem;
        list-style-type: disc;
    }

    .requirement-list li {
        margin-bottom: 0.5rem;
        line-height: 1.5;
        display: list-item;
    }

    .requirements-badge-title {
        flex-direction: column;
        align-items: center;
    }

    .resolution-badge {
        max-width: 60px;
        padding-top: 1rem !important;
    }

    ul {
        list-style-type: disc;
    }
}

@media (max-width: 768px) {
    .requirements-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .requirement-block {
        padding: 0.5rem;
        margin: 1rem;
    }

    .header-content {
        padding: 0.5rem;
    }

    .logo {
        display: none;
    }

    .logo-wrapper {
        justify-content: center;
        margin-bottom: 0.25rem;
    }

    .main-title {
        align-items: center;
        text-align: center;
    }

    .main-title h1 {
        font-size: 1.75rem;
    }

    .header-titles {
        text-align: center;
        align-items: center;
    }

    .nav-toggle {
        display: block;
        position: fixed;
    }
}

@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .header-titles {
        text-align: left;
    }

    .header-titles h1 {
        font-size: 2.25rem;
    }

    .accordion-content {
        max-height: 0;
        /* This allows JavaScript to override */
    }
}

@media (min-width: 1024px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .sidebar {
        left: 0;
        top: 160px;
        padding: 1.5rem;
        border-radius: 8px;
        margin: 1rem;
        height: calc(100vh - 180px);
    }

    .nav-toggle,
    .sidebar-close,
    .mobile-overlay {
        display: none;
        max-height: 0;
        /* This allows JavaScript to override */
    }

    .accordion-content {
        max-height: 0;
        /* Collapsed state */
        overflow: hidden;
        /* Prevents content from being visible when collapsed */
        transition: max-height 0.3s ease;
        /* Smooth transition */
    }

    .nav-link {
        font-weight: var(--font-regular);
        padding: 0.5rem 1rem;
    }

    .container {
        margin-left: 300px;
    }

    .main-content {
        padding: 2rem;
    }

    .section {
        padding: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .subsection-title {
        font-size: 1.4rem;
    }

    .requirements-section {
        grid-template-columns: 1fr;
    }

    .requirement-block {
        padding: 0.5rem;
        margin: 1rem;
    }

    .requirement-block ul {
        padding-left: 2rem;
    }

    .requirement-block h4 {
        font-size: 1.2rem;
    }

    .requirement-block h5 {
        font-size: 1rem;
        padding-left: 1rem;
        padding-top: 1rem;
    }

    .resolution-badge {
        max-width: 80px;
    }
}

/* ======================
13. Print Styles
====================== */
@media print {

    .sidebar,
    .nav-toggle {
        display: none;
    }

    .container {
        margin-left: 0;
    }

    .main-content {
        width: 100%;
    }

    .section {
        break-inside: avoid;
    }
}

/* ======================
14. Custom Scrollbars
====================== */
/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--light-bg);
}

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

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

/* Table Scrollbar */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* ======================
15. Footer Styles
====================== */
.footer {
    background: var(--secondary-color);
    padding: 1rem;
    margin-top: auto;
    border-radius: 4px;
}

.footer-content {
    text-align: center;
    color: #cccccc;
}

/* ======================
16. Additional Utility Styles
====================== */
.welcome-text {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-color);
    margin: 1rem 1rem;
}

.formatted-filename {
    font-family: monospace;
    font-size: 0.9rem;
    background: #e2e2e2;
    padding: 0.5rem;
    margin: 0.5rem 1rem;
    border-radius: 4px;
    overflow-x: auto;
    white-space: nowrap;
}

.timing-diagram {
    min-width: 600px;
    max-width: 100%;
    height: auto;
}

.program-layout {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.program-layout img {
    min-width: 600px;
    max-width: 100%;
    height: auto;
}

.failure-item {
    background: var(--light-bg);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
}

/* ======================
17. Alert Links & Additional Styles
====================== */
.alert-text-wrapper a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.alert-text-wrapper a:hover {
    text-decoration: none;
}

.alert-list {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

.alert ul {
    padding-left: 1.5rem;
    padding-bottom: 1rem;
}

ul ul {
    padding-left: 1.5rem;
}

/* ======================
18. Resolution Badge
====================== */
.resolution-badge {
    width: auto;
    max-width: 60px;
    height: auto;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.resolution-badge img {
    width: 100%;
    height: auto;
    display: block;
}

/* ======================
19. Delivery Method
====================== */
.delivery-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.delivery-content {
    color: var(--text-color);
}

.alert #audio-guidelines {
    padding-top: 0;
}

/* ======================
20. Naming Conventions
====================== */
.naming-convention {
    background: #f8f9fa;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    word-break: break-word;
}

.name-template {
    font-size: 0.8rem;
    padding: 0.2rem 0rem;
    margin: 0.2rem 1rem;
    overflow-x: auto;
    white-space: nowrap;
}

.name-template h4 {
    padding-left: 0rem;
    padding-top: 1rem;
    padding-bottom: 0.2rem;
    font-size: 1rem;
}

.code-content {
    padding: 0rem 0.8rem;
    margin: 0rem 0.8rem;
    font-family: monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
}

/* ======================
21. Tabs Styling
====================== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    margin-bottom: 0rem;
}

.tab-input {
    position: absolute;
    opacity: 0;
}

.tab-label {
    padding: 1rem 2rem;
    background: var(--light-bg);
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-right: 0.5rem;
    position: relative;
    top: 1px;
    transition: all 0.3s ease;
}

.tab-label:hover {
    background: white;
}

.tab-input:checked+.tab-label {
    background: white;
    border-color: var(--border-color);
    color: var(--primary-color);
    font-weight: bold;
    z-index: 1;
}

.tab-panel {
    display: none;
    width: 100%;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0 8px 8px 8px;
    order: 99;
}

.tab-input:checked+.tab-label+.tab-panel {
    display: block;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }

    .tab-label {
        width: 100%;
        margin: 0;
        border: 1px solid var(--border-color);
        border-radius: 0;
        margin-top: -1px;
        text-align: left;
        padding: 0.75rem 1rem;
    }

    .tab-label:first-child {
        border-radius: 8px 8px 0 0;
        margin-top: 0;
    }

    .tab-panel {
        border-top: none;
        padding: 1rem;
    }

    .tab-input:checked+.tab-label {
        background-color: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .tab-panel {
        padding: 0.75rem;
    }

    .tab-label {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }
}

/* ======================
22. PDF Download Button Styles
====================== */

.pdf-download-btn {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 1rem;
    margin: 1rem;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.pdf-download-btn:hover {
    background: #e7e7e7;
    transform: translateY(-2px);
    box-shadow: 0 4px 4px var(--primary-light-color);
    text-decoration: none;
    color: inherit;
}

/* ======================
23. Changelog Accordions
====================== */

/* Main changelog container */
.change-log {
    border-radius: 4px;
    margin: 0rem 1rem;
}

/* Primary changelog accordion */
.changelog-accordion {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background-color: #f9f9f9;
    margin-bottom: 1rem;
}

.changelog-accordion-header {
    background-color: #f1f1f1;
    padding: 1rem;
    cursor: pointer;
    font-weight: var(--font-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    position: relative;
    color: var(--secondary-color);
    transition: background-color 0.2s ease;
}

.changelog-accordion-header:hover {
    background-color: #e9e9e9;
}

.changelog-accordion-header::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

details[open]>.changelog-accordion-header::after {
    content: '−';
}

/* Secondary changelog accordion (nested) */
.changelog-sub-accordion {
    margin: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.changelog-sub-accordion-header {
    background-color: #e8e8e8;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: var(--font-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    color: var(--secondary-color);
    transition: background-color 0.2s ease;
}

.changelog-sub-accordion-header:hover {
    background-color: #e0e0e0;
}

.changelog-sub-accordion-header::after {
    content: '+';
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

details[open]>.changelog-sub-accordion-header::after {
    content: '−';
}

/* Accordion content */
.changelog-accordion-content,
.changelog-sub-accordion-content {
    padding: 0.75rem 1rem;
    background-color: white;
    display: none;
}

details[open]>.changelog-accordion-content,
details[open]>.changelog-sub-accordion-content {
    display: block;
}

/* Customize accordion with your existing styles */
.changelog-accordion .requirement-list,
.changelog-sub-accordion .requirement-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0.5rem;
}

.changelog-accordion .requirement-list li,
.changelog-sub-accordion .requirement-list li {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.changelog-accordion .requirement-list ul,
.changelog-sub-accordion .requirement-list ul {
    padding-left: 1.5rem;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.changelog-accordion .requirement-list ul li,
.changelog-sub-accordion .requirement-list ul li {
    font-weight: normal;
    margin-bottom: 0.25rem;
}

/* Ensure native details/summary elements remove default markers */
.changelog-accordion summary,
.changelog-sub-accordion summary {
    list-style: none;
}

.changelog-accordion summary::-webkit-details-marker,
.changelog-sub-accordion summary::-webkit-details-marker {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .changelog-accordion,
    .changelog-sub-accordion {
        margin: 0.5rem 0;
    }

    .changelog-sub-accordion {
        margin: 0.5rem;
    }

    .changelog-accordion-header,
    .changelog-sub-accordion-header {
        padding: 0.75rem;
    }
}

/* End of complete stylesheet */