@font-face {
    font-family: 'Geist Mono';
    src: url('https://fonts.googleapis.com/css2?family=Space+Mono&display=swap');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #000000;
    --secondary-color: #f5f5f5;
    --border-color: #e5e7eb;
    --text-color: #1f2937;
    --highlight-color: #f9fafb;
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
}

.font-geist-mono {
    font-family: 'Geist Mono', monospace;
}

.tab-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tab-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.tab-button.active {
    background-color: #000;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.accordion-header {
    cursor: pointer;
}

.accordion-icon {
    transition: transform 0.2s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

/* Team Tree Structure */
.team-tree {
    list-style: none;
    padding-right: 10px;
}

.team-tree ul {
    list-style: none;
    margin-right: 20px;
    position: relative;
}

.team-tree ul:before {
    content: "";
    display: block;
    width: 0;
    position: absolute;
    top: 0;
    bottom: 0;
    right: -20px;
    border-right: 1px solid #ddd;
}

.team-tree li {
    position: relative;
    padding: 5px 0;
}

.team-tree li:before {
    content: "";
    display: block;
    width: 20px;
    height: 0;
    border-top: 1px solid #ddd;
    position: absolute;
    top: 12px;
    right: -20px;
}

.team-role {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

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

/* Protocol Tabs Scrolling */
.protocol-tabs {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    -webkit-overflow-scrolling: touch;
}

/* Custom styling for specific components */
.improvement-cycle {
    position: relative;
}

.improvement-cycle .cycle-arrow {
    display: inline-block;
    position: relative;
    font-weight: bold;
    color: #333;
}

.risk-step, .exit-step, .billing-step {
    position: relative;
}

.dispute-step {
    position: relative;
}

.dispute-step:not(:last-child):after {
    content: "→";
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    font-weight: bold;
}

/* Print styling for PDF download */
@media print {
    header, footer, #download-pdf, #download-all-templates {
        display: none !important;
    }
    
    body {
        padding: 0;
        margin: 0;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .tab-content {
        display: block !important;
        page-break-after: always;
    }
    
    h2 {
        page-break-before: always;
    }
    
    h3, h4 {
        page-break-after: avoid;
    }
    
    table {
        page-break-inside: avoid;
    }
    
    .bg-gray-50, .bg-white, .border {
        background-color: white !important;
        border-color: #000 !important;
    }
}
