/* ============================================================
   Sklepy Stacjonarne – Kopalnie Węgla Kamiennego
   ============================================================ */

:root {
    --skl-accent: var(--pgg-sprzedaz-accent, #c0392b);
    --skl-accent-soft: #fdecea;
    --skl-accent-dark: #a93226;
}

/* ---- Layout row height align ---- */
.skl-main-row {
    align-items: stretch;
}

/* ---- Shared side panel ---- */
.skl-panel {
    /*background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 500px;*/
    position: relative;
    padding: 0;
}

/* ---- Placeholder loader dots (replaced by real content via JS) ---- */
.skl-panel-loader {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.skl-panel-loader span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
    animation: skl-pulse 1.2s infinite ease-in-out;
}
.skl-panel-loader span:nth-child(2) {
    animation-delay: 0.2s;
}
.skl-panel-loader span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes skl-pulse {
    0%,
    80%,
    100% {
        opacity: 0.25;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Map wrapper ---- */
.skl-map-wrapper {
    /*background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 6px;*/
    overflow: hidden;
    height: 460px;
    position: relative;
}
/* Google Maps canvas fills wrapper */
.skl-map-wrapper > div {
    width: 100% !important;
    height: 100% !important;
}
/* Fallback link+image from scripts.js initMap */
.skl-map-wrapper > a {
    display: block;
    width: 100%;
    height: 100%;
}
.skl-map-wrapper > a img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- AJAX loader gif center ---- */
#kopalnie img[src*="ajax-loader"],
#sortymenty img[src*="ajax-loader"],
#oferta img[src*="ajax-loader"] {
    display: block;
    margin: 40px auto;
}

#oferta img[src*="ajax-loader"] {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

/* ---- Section header (sp-bordered-header) ---- */
.sp-bordered-header {
    padding: 8px 12px 6px 14px;
    border-left: 4px solid var(--skl-accent);
    margin: 10px 10px 4px 10px;
}
.sp-bordered-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---- Mine list (#kopalnie) ---- */
#kopalnie ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#kopalnie ul li {
    border-bottom: 1px solid #f0f0f0;
}
#kopalnie ul li a {
    /*display: block;*/
    /*padding: 7px 12px 7px 16px;*/
    color: #333;
    text-decoration: none;
    /*font-size: 0.83rem;*/
    font-weight: 500;
    line-height: 1.3;
    transition:
        background 0.12s,
        color 0.12s,
        border-left-color 0.12s;
    border-left: 3px solid transparent;
}
#kopalnie ul li a:hover {
    background: var(--skl-accent-soft);
    color: var(--skl-accent);
    border-left-color: var(--skl-accent);
}
/* Active / selected mine */
#kopalnie ul li a.btn-coal-list-bg {
    background: var(--skl-accent-soft);
    color: var(--skl-accent);
    border-left-color: var(--skl-accent);
    font-weight: 600;
}
/* Ruch (sub-units) */
#kopalnie ul ul {
    background: #fff;
    border-top: 1px solid #f0f0f0;
}
#kopalnie ul ul li a {
    /*font-size: 0.78rem;*/
    padding-left: 28px;
    color: #555;
}
#kopalnie ul ul li a:hover {
    color: var(--skl-accent);
}

/* "Lista kopalń" restore button */
.btn-kwklist {
    display: block;
    margin: 6px 10px;
    /*font-size: 0.8rem;*/
    padding: 5px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: var(--skl-accent);
    text-align: center;
    text-decoration: none;
    transition: background 0.12s;
}
.btn-kwklist:hover {
    background: var(--skl-accent-soft);
    color: var(--skl-accent);
}
/* Mine info card (getKwkInfo) */
.restoreKwkList {
    padding: 4px 10px;
}
.restoreKwkList hr {
    margin: 8px 0;
}

#kopalnie .kwk-info-content {
    padding: 10px 12px 6px;
}

#kopalnie .kwk-info-content > div + div {
    margin-top: 8px;
}

/* Align selected mine heading color with section headings (e.g. "Nasze marki") */
#kopalnie .kwk-info-content > div:first-child {
    color: var(--skl-accent) !important;
}

/* ---- Side menu (inside kopalnie panel) ---- */
.sp-side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sp-side-menu ul li a {
    display: block;
    padding: 5px 12px;
    /*font-size: 0.82rem;*/
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f3f3f3;
    transition: color 0.1s;
}
.sp-side-menu ul li a:hover {
    color: var(--skl-accent);
}

/* ---- Fuel / brand buttons (#sortymenty) ---- */
#sortymenty {
    padding: 8px 6px 6px;
}
#sortymenty h2 {
    /*font-size: 0.82rem;*/
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--skl-accent);
    padding: 0 4px 4px;
    margin: 6px 0 5px;
    border-bottom: 2px solid var(--skl-accent);
}
#sortymenty .btn-coal-list {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    margin-bottom: 3px;
    padding: 7px 12px 7px 16px;
    border-radius: 4px;
    /*font-size: 0.83rem;*/
    line-height: 1.3;
    font-weight: 500;
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 3px solid transparent;
    color: #333;
    text-decoration: none;
    transition:
        background 0.12s,
        color 0.12s,
        border-left-color 0.12s,
        border-color 0.12s;
}
#sortymenty .btn-coal-list:hover,
#sortymenty .btn-coal-list.btn-coal-list-bg {
    background: var(--skl-accent-soft);
    border-color: #dee2e6;
    border-left-color: var(--skl-accent);
    color: var(--skl-accent);
}
#sortymenty .sort {
    display: block;
    width: 100%;
    /* cancel the offset-* utilities that are on the inner div */
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* ---- Oferta table section ---- */
#oferta {
    margin-bottom: 1rem;
}

#oferta > .col-12.order-1 {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
}

.table-oferta {
    /*font-size: 0.78rem;*/
    margin-bottom: 0.5rem;
    background: #fff;
}
.table-oferta thead th,
.table-oferta thead td {
    background: #fff;
    /*font-size: 0.72rem;*/
    white-space: nowrap;
    padding: 5px 6px;
    vertical-align: middle;
    border-bottom: 2px solid var(--skl-accent) !important;
}
.table-oferta tbody td {
    padding: 4px 6px;
    vertical-align: middle;
}

.table-oferta tbody tr:nth-child(4n + 1) > td,
.table-oferta tbody tr:nth-child(4n + 2) > td {
    background: #fff !important;
}

.table-oferta tbody tr:nth-child(4n + 3) > td,
.table-oferta tbody tr:nth-child(4n + 4) > td {
    background: #f6f7f8 !important;
}

/* Hidden detail row */
.table-oferta tbody tr.uwagi > td,
.table-oferta tbody tr[style*="display:none"] > td,
.table-oferta tbody tr[style*="display: none"] > td {
    /*font-size: 0.75rem;*/
    border-top: none;
    color: #555;
}
.table-oferta tfoot td {
    padding: 0;
}

/* infoSort side panel (brand image + shop link) */
.infoSort {
    text-align: center;
    padding-top: 8px;
}

#oferta .infoSort {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

#oferta .infoSort .btn {
    max-width: 320px;
}
.infoSort img {
    max-width: 85%;
    display: block;
    margin: 0 auto 12px;
}
.infoSort .btn-primary {
    background-color: var(--skl-accent);
    border-color: var(--skl-accent);
}
.infoSort .btn-primary:hover {
    background-color: var(--skl-accent-dark);
    border-color: var(--skl-accent-dark);
}

/* ---- Oferta card (bottom static info section) ---- */
.card-oferta {
    /*font-size: 0.875rem;*/
    background: #fff;
}

/* ---- Utilities ---- */
.text-red {
    color: var(--skl-accent) !important;
}
.hide {
    visibility: hidden;
}
/* Toggle chevron via jQuery (don't break fa) */
a .fa-chevron-down,
a .fa-chevron-up,
a .fa-angle-down,
a .fa-angle-up {
    transition: none;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .skl-panel,
    .skl-map-wrapper {
        height: 320px;
    }
}
@media (max-width: 575.98px) {
    .skl-panel,
    .skl-map-wrapper {
        height: 280px;
    }
    .sp-bordered-header {
        margin: 8px 8px 4px;
    }
}
