/* --- CONTAINER & LAYOUT --- */
.git-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--ios-separator);
    flex-shrink: 0;
}

.git-toggle-btn {
    padding: 0 12px;
    background: transparent;
    border: 1px solid var(--ios-separator);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    height: 32px;
    display: flex;
    align-items: center;
}

.git-toggle-btn.active {
    background: var(--ios-blue);
    color: #fff;
    border-color: var(--ios-blue);
}


.git-view-container {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #0d1117;
    display: none;
    flex-direction: row;
    overflow: hidden;
}

.git-view-container.active {
    display: flex;




/* --- SECTIONS & TREE --- */
.git-section {
    margin-bottom: 0;
}

.git-section-header {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #8b949e;
    background: #161b22;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #21262d;
}

.git-section-header:hover {
    color: #c9d1d9;
}

.git-badge {
    background: #30363d;
    color: #c9d1d9;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

.git-tree-root {
    list-style: none;
    padding: 0;
    margin: 0;
}

.git-tree-node {
    list-style: none;
}

.git-tree-content {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    height: 24px;
    color: #c9d1d9;
    white-space: nowrap;
}

.git-tree-content:hover {
    background: #161b22;
}

.git-tree-content.selected {
    background: #30363d;
    color: #fff;
}

.git-indent-guide {
    display: inline-block;
    width: 16px;
    height: 100%;
    flex-shrink: 0;
}

.git-arrow {
    width: 16px;
    text-align: center;
    font-size: 10px;
    color: #8b949e;
    transition: transform 0.15s;
    display: inline-block;
    flex-shrink: 0;
}

.git-tree-node.collapsed>.git-tree-content>.git-arrow {
    transform: rotate(-90deg);
}

.git-tree-node.collapsed>ul {
    display: none;
}

.git-icon {
    margin-right: 6px;
    font-weight: bold;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}

/* Status Colors */
.git-status-M {
    color: #d29922;
}

.git-status-A,
.git-status-U {
    color: #3fb950;
}

.git-status-D {
    color: #f85149;
    text-decoration: line-through;
}

.git-status-R {
    color: #d29922;
}

.git-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.git-dir-label {
    color: #c9d1d9;
}

.git-file-label {
    color: #8b949e;
}

.git-tree-content:hover .git-file-label,
.git-tree-content.selected .git-file-label {
    color: #e6edf3;
}

/* ACTIONS */
.git-actions {
    display: none;
    margin-left: 6px;
    flex-shrink: 0;
}

.git-tree-content:hover .git-actions {
    display: flex;
    gap: 4px;
}

.git-btn-action {
    background: transparent;
    border: none;
    color: #c9d1d9;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
}

.git-btn-action:hover {
    background: #30363d;
    color: #fff;
}

/* Destructive Action (Discard) */
.git-btn-action.destructive:hover {
    background: #f85149;
    color: #fff;
}

/* --- DIFF AREA --- */
.git-diff-area {
    flex: 1;
    overflow: auto;
    background: #0d1117;
    position: relative;
    display: flex;
    flex-direction: column;
}

.git-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8b949e;
}

/* Diff2Html Overrides */
.d2h-wrapper * {
    box-sizing: border-box;
}

.d2h-file-list-wrapper {
    display: none;
}

.d2h-wrapper {
    margin: 0;
}

.d2h-file-header {
    display: none;
}

.d2h-code-line-ctn,
.d2h-code-line,
.hljs {
    color: #e6edf3 !important;
    background: transparent !important;
    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.d2h-code-side-linenumber {
    background: #0d1117 !important;
    border-color: #30363d !important;
    color: #6e7681 !important;
}

.d2h-ins {
    background-color: rgba(46, 160, 67, 0.15) !important;
}

.d2h-del {
    background-color: rgba(248, 81, 73, 0.15) !important;
}