﻿/* =========================
   BASE / GLOBAL
========================= */

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* =========================
   THEME SWITCH
========================= */

.theme-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 26px;
}

    .theme-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
    }

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.slider.round {
    border-radius: 26px;
}

    .slider.round:before {
        border-radius: 50%;
    }

/* =========================
   EXPAND / COLLAPSE BUTTONS
========================= */

.expand-btn,
.collapse-btn {
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
    border: 1px solid #0d6efd;
    background: #fff;
    color: #0d6efd;
    font-size: 0; 
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .expand-btn:hover,
    .collapse-btn:hover {
        background: #0d6efd;
        color: #fff;
    }

    .expand-btn:disabled,
    .collapse-btn:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

    .expand-btn .ag-icon,
    .collapse-btn .ag-icon {
        display: block;
        width: 14px;
        height: 14px;
        line-height: 1;
        margin: 0;
        vertical-align: middle;
    }

    .collapse-btn .ag-icon {
        transform: translate(-1px, -0.5px);
    }

/* =========================
   AG GRID – KOLUMNA __expand
========================= */

.ag-theme-alpine .ag-cell.expand-col {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-theme-alpine
.ag-header-cell[col-id="__expand"]
.ag-header-cell-comp-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.ag-theme-alpine
.ag-row
.ag-cell[col-id="__expand"]
.expand-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* =========================
   FULL WIDTH ROW (POZYCJE)
========================= */

.items-fw-wrapper {
    display: flex;
    width: 100%;
}

.items-fw-left-slot {
    box-sizing: border-box;
    flex: 0 0 var(--expand-slot-w, 30px); 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: translateX(-8px);
}

.items-fw-right-slot {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 0 8px 0;
}

/* =========================
   FULL WIDTH – PINNED SAFE
========================= */

.ag-theme-alpine
.ag-full-width-row
.ag-pinned-left-cols-container
.items-fw-wrapper,
.ag-theme-alpine
.ag-full-width-row
.ag-pinned-right-cols-container
.items-fw-wrapper {
    display: none !important;
}

.ag-theme-alpine
.ag-full-width-row
.ag-pinned-left-cols-container
.items-fw-empty,
.ag-theme-alpine
.ag-full-width-row
.ag-pinned-right-cols-container
.items-fw-empty {
    display: block;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.ag-pinned-right-cols-container {
    pointer-events: auto !important;
}

.ag-cell {
    user-select: text !important;
}
