/**
 * Dobierator mocowań TUN — style
 * Ścieżka: /funky/public/static/css/sections/configurator.css
 *
 * WAŻNE: Ten plik musi leżeć w /static/css/sections/ bo master.blade.php
 * ładuje CSS sekcji z tej ścieżki przez:
 *   @foreach($sections_css AS $css)
 *       <link href="/static/css/sections/$css.css">
 *
 * Prefiksy "cfg-" unikają kolizji z Bootstrap 4 i stylami CMS Synteco.
 * Paleta kolorów spójna z MABO.pl (#011a3e navy, #2e86ab blue, #c8102e accent).
 */

/* ===== Zmienne ===== */
:root {
    --cfg-navy: #011a3e;
    --cfg-navy-light: #0a2a5c;
    --cfg-accent: #c8102e;
    --cfg-blue: #2e86ab;
    --cfg-green: #10b981;
    --cfg-amber: #e8830c;
    --cfg-red: #ef4444;
    --cfg-bg: #f2f4f7;
    --cfg-card: #fff;
    --cfg-border: #dce0e6;
    --cfg-text: #1a1e2c;
    --cfg-muted: #64748b;
    --cfg-label: #8892a4;
}

/* ===== Breadcrumb ===== */
.cfg-breadcrumb {
    font-size: 12px;
    color: var(--cfg-muted);
    margin: 200px 0 12px;
    padding: 0;
}

.cfg-breadcrumb a {
    color: var(--cfg-blue);
    text-decoration: none;
}

.cfg-breadcrumb a:hover {
    text-decoration: underline;
}

.cfg-breadcrumb__sep {
    margin: 0 6px;
    color: #ccc;
}

.cfg-breadcrumb__current {
    color: var(--cfg-text);
    font-weight: 500;
}

/* ===== Nagłówek ===== */
.cfg-header {
    margin-bottom: 32px;
}

.cfg-header__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--cfg-navy);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.cfg-header__icon {
    color: var(--cfg-blue);
    margin-right: 8px;
    font-size: 24px;
}

.cfg-header__subtitle {
    color: var(--cfg-muted);
    font-size: 15px;
    margin-top: 6px;
    font-weight: 400;
}

/* ===== Panel wyszukiwania ===== */
.cfg-search-panel {
    background: var(--cfg-card);
    border: 1px solid var(--cfg-border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.cfg-search-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.cfg-field {
    flex: 1;
    min-width: 200px;
}

.cfg-field__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--cfg-label);
    margin-bottom: 6px;
}

.cfg-field__select {
    width: 100%;
    padding: 11px 36px 11px 14px;
    background-color: var(--cfg-bg);
    border: 1.5px solid var(--cfg-border);
    border-radius: 8px;
    color: var(--cfg-text);
    font-size: 14px;
    font-weight: 500;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all 0.15s ease;
}

.cfg-field__select:focus {
    outline: none;
    border-color: var(--cfg-blue);
    box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.12);
}

.cfg-field__select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ===== Przycisk Szukaj ===== */
.cfg-btn-search {
    padding: 11px 28px;
    background: var(--cfg-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
}

.cfg-btn-search:hover:not(:disabled) {
    background: var(--cfg-navy-light);
    box-shadow: 0 3px 10px rgba(1, 26, 62, 0.2);
}

.cfg-btn-search:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cfg-btn-search i {
    font-size: 13px;
}

/* ===== Wyniki — animacja ===== */
.result-area {
    animation: cfgFadeUp 0.35s ease;
}

@keyframes cfgFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ===== Status bar ===== */
.status-bar {
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.status-bar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.st-ok   { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.st-ok   .dot { background: var(--cfg-green); }
.st-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.st-warn .dot { background: var(--cfg-amber); }
.st-err  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.st-err  .dot { background: var(--cfg-red); }

/* ===== Karty wyników ===== */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.card {
    background: var(--cfg-card);
    border: 1px solid var(--cfg-border);
    border-radius: 10px;
    padding: 20px 22px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: rgba(46, 134, 171, 0.25);
}

.card h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cfg-blue);
    margin-bottom: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--cfg-border);
}

.card.full {
    grid-column: 1 / -1;
}

/* ===== Wiersze danych ===== */
.rw {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid #f0f1f4;
}

.rw:last-child {
    border-bottom: none;
}

.rw .l {
    font-size: 12px;
    color: var(--cfg-muted);
}

.rw .v {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}

.v-accent {
    color: var(--cfg-navy) !important;
    font-size: 15px !important;
}

.v-mono {
    font-family: 'Courier New', monospace;
    color: var(--cfg-green);
}

/* ===== ERP box ===== */
.erp-box {
    background: var(--cfg-bg);
    border: 1px solid var(--cfg-border);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--cfg-blue);
    font-weight: 600;
    word-break: break-all;
}

.erp-desc {
    font-size: 12px;
    color: var(--cfg-muted);
    margin-top: 6px;
}

/* ===== Uwagi ===== */
.notes-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* ===== Pusty stan ===== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--cfg-muted);
}

.empty-state i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.25;
    display: block;
}

.empty-state p {
    font-size: 14px;
}

/* ===== Legenda ===== */
.cfg-legend {
    margin-top: 24px;
    padding: 18px 22px;
    background: var(--cfg-card);
    border: 1px solid var(--cfg-border);
    border-radius: 10px;
}

.cfg-legend__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--cfg-label);
    font-weight: 700;
    margin-bottom: 10px;
}

.cfg-legend__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.cfg-legend__grid span {
    font-size: 12px;
    color: var(--cfg-muted);
}

.cfg-legend__grid b {
    color: var(--cfg-text);
    font-weight: 600;
}

/* ===== Counter ===== */
.cfg-counter {
    font-size: 11px;
    color: var(--cfg-label);
    text-align: center;
    margin-top: 14px;
}

/* ===== Przełącznik języka ===== */
.cfg-lang-btn {
    padding: 5px 12px;
    border: 1.5px solid var(--cfg-border);
    background: var(--cfg-card);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--cfg-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.5px;
}

.cfg-lang-btn:hover {
    border-color: var(--cfg-blue);
    color: var(--cfg-blue);
}

.cfg-lang-btn--active {
    background: var(--cfg-navy);
    border-color: var(--cfg-navy);
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 680px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .cfg-search-row {
        flex-direction: column;
    }

    .cfg-field {
        min-width: 100%;
    }

    .cfg-btn-search {
        width: 100%;
        justify-content: center;
    }

    .cfg-header__title {
        font-size: 22px;
    }
}

/* ===== Druk ===== */
@media print {
    .cfg-btn-search,
    .cfg-legend,
    .cfg-breadcrumb,
    .cfg-lang-btn {
        display: none !important;
    }

    .cfg-search-panel {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .cards {
        break-inside: avoid;
    }
}
