:root {
    --bg-primary: #F9FAFB;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F3F4F6;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --accent-green: #10B981;
    --accent-blue: #3B82F6;
    --accent-red: #EF4444;
    --accent-orange: #F59E0B;
    --accent-purple: #8B5CF6;
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-md: 8px;
    --radius-lg: 12px;
    --line-height: 1.6;
}
.dark {
    --bg-primary: #222;
    --bg-secondary: #555;
    --bg-tertiary: #555;
    --text-primary: #aaa;
    --text-secondary: #eee;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0px;
}
h2 {
    margin-top: 20px;
}
.container {
    max-width: 2200px;
}

.content-area {
    flex: 1;
    padding: 32px 17px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 500px) {
    .content-area {
        padding: 16px;
    }
}

/* messes with Drupal
@media (min-width: 1201px) {
    .container {
        padding: 0 40px;
    }
}
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
}
*/

/* ===== NAVIGATION & BREADCRUMBS ===== */
.breadcrumbs,
div.breadcrumb {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: -4px;
    padding-top: 8px;
}

.breadcrumbs a,
div.breadcrumb a {
    align-items: center;
    border-radius: 999px;
    color: var(--accent-blue);
    display: inline-flex;
    gap: 2px;
    padding: 4px 6px;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible,
div.breadcrumb a:hover,
div.breadcrumb a:focus-visible {
    background-color: rgba(156, 163, 175, 0.28);
    text-decoration: none;
    outline: none;
}

.dark .breadcrumbs a:hover,
.dark .breadcrumbs a:focus-visible,
.dark div.breadcrumb a:hover,
.dark div.breadcrumb a:focus-visible {
    background-color: rgba(107, 114, 128, 0.3);
}

.breadcrumbs .material-icons,
div.breadcrumb .material-icons {
    font-size: 18px;
    line-height: 1;
}

/* ===== HEADERS ===== */
.header {
    backgroundX: var(--bg-secondary);
    padding: 24px;
    padding-bottom: 0px;
    border-radiusX: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.header-center {
    backgroundX: var(--bg-secondary);
    border-radiusX: var(--radius-lg);
    margin-bottom: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 1;
    text-align: center;
}

.header-center h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-center p {
    font-size: 16px;
}

@media (max-width: 600px) {
    .header-center {
        position: static;
        transform: none;
        background: var(--bg-header);
        border-radius: 0;
        padding: 16px;
        color: var(--text-primary);
    }
}
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    overflow-x: auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.dark .card {
    background: #555;
}

.side-padding {
    padding-left: 17px;
    padding-right: 17px;
}
.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0px;
    margin-bottom: 16px;
    align-items: center;
    gap: 8px;
}

/* Override h1 styling when used with card-title */
h1.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0px;
    margin-bottom: 16px;
}

#webrootSetup {
    padding-bottom: 12px;
}

.log-output {
    background: #1a1a1a;
    color: #00ff00;
    padding: 16px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* ===== BUTTONS ===== */

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--border-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    /* Caused hover to occur on active layout indicator on team/projects */
    /* background: var(--border-light); */
}

.btn-width {
    min-width: 144px;
}

.with-ai-content { display: block; }
.without-ai-content { display: none; }

.quickstart-commands-toggle-group {
    align-items: center;
}

.quickstart-commands-toggle-group .quickstart-commands-toggle-btn {
    min-width: 0 !important;
    width: auto !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quickstart-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    overflow: hidden;
    visibility: hidden;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
}

.material-icons-loaded .quickstart-toggle-icon.material-icons {
    visibility: visible;
}

.quickstart-commands-toggle-group.compact-toggle-group {
    gap: 2px !important;
}

.quickstart-commands-toggle-group.compact-toggle-group .quickstart-commands-toggle-btn {
    padding-left: 9px;
}

#webserver-commands-toggle .quickstart-commands-toggle-btn:nth-child(-n + 2) {
    margin-right: 6px;
}

#webserver-commands-toggle {
    margin-bottom: 10px;
}

.quickstart-commands-toggle-group.compact-toggle-group .quickstart-toggle-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.actions {
    display: flex;
    gap: 12px;
}

#coding-with-row {
    container-type: inline-size;
}

@container (max-width: 640px) {
    #coding-with-right {
        width: 100%;
        margin-left: 0;
        align-items: flex-start !important;
    }
    #coding-with-os-wrap {
        align-items: flex-start !important;
    }
    #coding-with-right .mac-instructions {
        text-align: left;
    }
    .quickstart-commands-toggle-group.compact-toggle-group {
        margin-left: 0 !important;
        justify-content: flex-start !important;
        width: 100%;
    }
}
/* ===== STATUS INDICATORS ===== */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-indicator.connected {
    background: var(--accent-green);
}

.status-indicator.error {
    background: var(--accent-red);
}

.status-indicator.loading {
    background: var(--accent-orange);
    animation: pulse 1.5s infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== MESSAGE COMPONENTS ===== */
.config-info {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 16px 0;
    white-space: pre-line;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-size: 14px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.warning-message {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-orange);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-size: 14px;
}

/* ===== SPECIALIZED COMPONENTS ===== */
.test-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.test-result h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.test-result .details {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-top: 8px;
    white-space: pre-wrap;
}

.gemini-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(45deg, #4C1D95, #8B5CF6);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.info-item {
    background: var(--bg-tertiary);
    padding: 12px;
    border-radius: var(--radius-md);
}

.info-item strong {
    color: var(--text-primary);
}

/* ===== LAYOUT OVERRIDES ===== */
/* Ensure all content containers respect viewport width */
.container, .card, .readme-content {
    min-width: 0;
    overflow-wrap: break-word;
}

/* Fix for standalone navigation layout - desktop only */
@media (min-width: 769px) {
    .main-content {
        min-width: 0;
        overflow-x: auto;
    }
}

/* Specific fix for code blocks that are too wide */
pre:has(code) {
    margin-bottom: 10px;
}
/* removed: pre, */
pre code {
    max-width: 100%; /* Use container width, not viewport width */
    overflow-x: auto !important;
    white-space: pre !important;
    word-wrap: normal !important;
    width: 100%;
    box-sizing: border-box;
    /* Ensure code blocks can't expand beyond their container */
    min-width: 0;
}
.no-bottom-margin, .no-bottom-margin pre, .no-bottom-margin code, .no-bottom-margin pre code {
    margin-bottom: 0px !important;
}
/* ===== CARD SECTIONS ===== */
.cardsection {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    line-height: var(--line-height);
}

#cli-commands {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapse-toggle-btn {
    position: absolute !important;
    top: 8px;
    right: 0px;
    margin-right: 10px;
    padding: 6px 12px !important;
    font-size: 12px !important;
    z-index: 10 !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.collapse-toggle-btn.btn-primary {
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    color: white !important;
}

.collapse-toggle-btn.btn-primary:hover {
    background: #1164A3 !important;
    transform: translateY(-1px);
}
.dark .btn-secondary:hover {
    /* Caused hover to occur on active layout indicator on team/projects */
    /* color:#333 !important; */
}
.dark #quickstartDiv-toggle .quickstart-commands-toggle-btn[data-active="false"] {
    background-color: var(--border-medium);
    border-color: var(--border-medium);
    color: var(--text-secondary);
}
.collapse-toggle-btn.btn-secondary:hover {
    background: var(--border-medium) !important;
    transform: translateY(-1px);
}
.collapse-status {
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    font-style: italic !important;
    padding: 8px 0 !important;
}

/* Additional fix for readme content within navigation layout */
.main-content .readme-content,
.main-content .card {
    max-width: 100%;
    overflow-x: auto;
    min-width: 0;
}

/* Team tabs styling */
.page-tab-container {
    background: #eee;
    padding: 8px;
    padding-left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    margin-bottom: 0;
    position: relative;
    border-radius: 8px 8px 0 0;
}
.page-tab-container:hover  {
    background: #ddd;
    transform: translateY(-1px);
}
.dark .page-tab-container {
    background: #374151;
}
.dark .page-tab-container:hover  {
    background: #444;
    transform: translateY(-1px);
}
.page-tab {
    /* background: #28a745; */
    background: #bbb;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    min-width: 80px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}
.page-tab:hover {
    background: #218838;
}
.page-tab.active {
    background: #007bff;
    background: #235D39; /* Georgia Pine */
    color: white;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}
.page-tab.btn-secondary {
    background: #6B7280;
    color: white;
}
.page-tab.btn-secondary:hover {
    background: #4B5563;
}
.page-tab-line {
    height: 2px;
    background: #4b5563;
    background: #333;
    margin-top: -1px;
    border-radius: 0 0 4px 4px;
    transition: background-color 0.3s ease;
}
.page-tab-align {
    margin: 15px 0 10px 12px;
}
.dark .page-tab {
    background: #374151;
    color: #e5e7eb;
}

.dark .page-tab:hover {
    background: #4b5563;
}

.dark .page-tab.active {
    background: #3b82f6;
}

/*
.dark .page-tab-line {
    background: #4b5563;
}
*/

/* Generic active tab system */
.page-tab-line.active {
    background: #28a745;
}

.dark .page-tab-line.active {
    background: #3b82f6;
}
