/* compare.css – wygląd porównywarki (modal + sticky bar) */

#compare-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2147483647;
    padding: 20px;
    overflow-y: auto;
}

#compare-modal-tile {
    background: #fff;
    max-width: 1250px;
    margin: 20px auto;
    border-radius: 20px;
    overflow: visible;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 2147483647;
}

.m-modal-close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    border: none;
    background: none;
    font-size: 35px;
    cursor: pointer;
    color: #aaa;
    z-index: 100;
}

/* WYSZUKIWARKA */

.m-modal-search-box {
    padding: 30px;
    background: #f9fbfc;
    border-bottom: 1px solid #eee;
    text-align: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.m-modal-search-input {
    width: 100%;
    max-width: 550px;
    padding: 14px 25px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
}

#m-autocomplete-list {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 550px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    z-index: 9999999;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #eee;
}

.m-search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
}

.m-search-item:hover {
    background: #f4eeff;
}

.m-search-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* ZAKŁADKI */

.m-modal-tabs-nav {
    display: flex;
    background: #f9fbfc;
    border-bottom: 1px solid #eee;
}

.m-modal-tab-btn {
    flex: 1;
    padding: 18px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    color: #1d2b4f;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}

.m-modal-tab-btn.active {
    color: #a259ff;
    border-bottom: 3px solid #a259ff;
    background: #fff;
}

/* TABELA */

.m-modal-render-area {
    overflow-x: auto;
    padding-bottom: 30px;
}

.m-comp-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.m-comp-table th {
    padding: 25px 15px;
    vertical-align: top;
    border-bottom: 2px solid #f1f4f8;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    min-width: 200px;
}

.m-comp-table td {
    padding: 15px;
    border-right: 1px solid #f1f4f8;
    vertical-align: top;
    background: #fff;
}

.m-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.m-img-wrapper img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.m-btn-remove {
    background: #c64b4b;
    color: #fff;
    width: 100%;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

/* PODŚWIETLANIE WIERSZY */

.m-sync-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 8px;
    margin: 2px 0;
    border-radius: 4px;
    transition: 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.m-sync-row.is-hovered {
    background: #f4eeff !important;
    color: #a259ff;
}

.m-sync-row.is-hovered-high {
    background: #f4eeff !important;
}

.m-sync-row.is-hovered-low {
    background: #fff1f1 !important;
}

.m-sync-row.is-hovered-winner {
    background: #e8f5e9 !important;
}

.m-sync-row.is-hovered-high .m-score-val {
    color: #a259ff;
    font-weight: 800;
}

.m-sync-row.is-hovered-low .m-score-val {
    color: #ff4b4b;
    font-weight: 800;
}

.m-sync-row.is-hovered-winner .m-score-val {
    color: #2e7d32;
    font-weight: 900;
}

.rat-bar-bg {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
    width: 100%;
}

.rat-bar-fill {
    height: 100%;
    transition: width 0.5s;
}

/* STICKY BAR */

#sticky-comp-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1d2b4f;
    color: #fff;
    padding: 14px 35px;
    border-radius: 50px;
    display: none;
    align-items: center;
    gap: 20px;
    z-index: 999999;
    border: 2px solid #a259ff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.m-sticky-label {
    font-weight: 600;
}

.m-sticky-btn {
    background: #a2d200;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 800;
    color: #1d2b4f;
}
