/* ============================================
   MOBILE COMPARE STYLES
   Кнопка на карточке, тост, страница сравнения
   ============================================ */

/* === Compare button on cards === */

/* Button group container */
.cmp-mob-group {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.cmp-mob-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    padding: 0;
    color: #94a3b8;
    -webkit-tap-highlight-color: transparent;
}
.cmp-mob-btn:active {
    transform: scale(0.88);
}
.cmp-mob-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}
.cmp-mob-btn--active {
    background: #f3bc3e !important;
    color: #1a1a1a !important;
}

html.dark .cmp-mob-btn {
    background: rgba(255,255,255,0.08);
    color: #64748b;
}

/* Eye button — view compare */
.cmp-mob-view {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: #5B9BD5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, opacity 0.25s;
    padding: 0;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}
.cmp-mob-view:active {
    transform: scale(0.88);
}
.cmp-mob-view svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* === Toast notification (top, full-width with 20px margins) === */
.cmp-m-toast {
    position: fixed;
    top: -70px;
    left: 20px;
    right: 20px;
    z-index: 99999;
    padding: 14px 18px;
    border-radius: 14px;
    background: #242F3D;
    color: #f1f5f9;
    font-family: var(--font-family, system-ui, sans-serif);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    transition: top 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s;
    opacity: 0;
    pointer-events: none;
}
.cmp-m-toast--show {
    top: 12px;
    opacity: 1;
}
.cmp-m-toast--hide {
    top: -70px;
    opacity: 0;
}
.cmp-m-toast--remove {
    background: #2d2024;
    border-color: rgba(239,68,68,0.25);
}
.cmp-m-toast--max {
    background: #2d2920;
    border-color: rgba(234,179,8,0.25);
}

/* === Burger menu badge — стили в burger.css === */

/* ══════════════════════════════════════
   COMPARE PAGE
   ══════════════════════════════════════ */

/* Page header */
.cmp-m-page-hd {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px 14px;
}
.cmp-m-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.2s;
}
.cmp-m-back:active {
    background: rgba(255,255,255,0.12);
}
.cmp-m-page-title {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
}
.cmp-m-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #5B9BD5;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 0 6px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Empty state */
.cmp-m-empty {
    text-align: center;
    padding: 56px 32px;
}
.cmp-m-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}
.cmp-m-empty-text {
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 24px;
    line-height: 1.5;
}
.cmp-m-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #172554;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s;
}
.cmp-m-empty-btn:active {
    transform: scale(0.96);
}

/* Loading skeleton */
.cmp-m-loading {
    padding: 24px 16px;
}
.cmp-m-skel {
    height: 18px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    margin-bottom: 14px;
    animation: cmpSkelPulse 1.5s ease-in-out infinite;
}
@keyframes cmpSkelPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Error */
.cmp-m-error {
    text-align: center;
    color: #ef4444;
    padding: 32px 16px;
    font-size: 14px;
}

/* === Filter buttons (desktop-style radio+label) === */
.cmp-m-filters {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    align-items: center;
    flex-wrap: wrap;
    background: #1e2a38;
}
.cmp-m-filter-group {
    display: inline-flex;
    overflow: hidden;
    border-radius: 8px;
    border: 0.5px solid #31343e;
}
.cmp-m-filter-item {
    display: inline-block;
}
.cmp-m-filter-group input[type=radio] {
    display: none;
}
.cmp-m-filter-group label {
    display: inline-block;
    cursor: pointer;
    padding: 6px 14px;
    line-height: 20px;
    border: none;
    font-size: 12px;
    font-weight: 500;
    color: rgb(127,145,164);
    user-select: none;
    transition: background 0.2s, color 0.2s;
    background: #2B3340;
    font-family: var(--font-family, system-ui, sans-serif);
    -webkit-tap-highlight-color: transparent;
}
.cmp-m-filter-group .cmp-m-filter-item:first-child label {
    border-radius: 8px 0 0 8px;
}
.cmp-m-filter-group .cmp-m-filter-item:last-child label {
    border-radius: 0 8px 8px 0;
}
.cmp-m-filter-group input[type=radio]:checked + label {
    background: #19212A;
    color: #fff;
}
.cmp-m-clear-btn {
    margin-left: auto;
    background: #B12234;
    border: none;
    border-radius: 8px;
    padding: 0 14px;
    height: 32px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family, system-ui, sans-serif);
}
.cmp-m-clear-btn:active {
    transform: scale(0.95);
    background: #9a1e2e;
}

/* === Table with sticky first column === */
.cmp-m-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 40px;
}
.cmp-m-table-wrap::-webkit-scrollbar { display: none; }

.cmp-m-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    font-family: var(--font-family, system-ui, sans-serif);
}

/* Sticky parameter column (left) */
.cmp-m-param-hd,
.cmp-m-param {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #242f3d;
    min-width: 110px;
    max-width: 130px;
    padding: 9px 10px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.35;
}

/* Top-left corner cell */
.cmp-m-param-hd {
    z-index: 10;
    vertical-align: bottom;
    padding: 12px 10px;
    background: #242f3d;
}

/* Car header cells */
.cmp-m-car-hd {
    min-width: 150px;
    max-width: 180px;
    padding: 12px 10px;
    text-align: center;
    vertical-align: top;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: #22282a;
}
.cmp-m-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #16202A;
}
.cmp-m-car-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.cmp-m-car-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}
.cmp-m-car-price {
    font-size: 15px;
    font-weight: 700;
    color: #5B9BD5;
}

/* Remove button */
.cmp-m-remove-btn {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}
.cmp-m-remove-btn:active {
    background: rgba(239,68,68,0.6);
}
.cmp-m-remove-btn--static {
    position: static;
    margin: 0 auto 8px;
}
.cmp-m-car-hd--nophoto {
    vertical-align: bottom;
}

/* Section rows */
.cmp-m-section-name {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #242f3d;
    min-width: 110px;
    max-width: 130px;
    padding: 10px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.35;
}
.cmp-m-section-pad {
    background: #242f3d;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Value cells */
.cmp-m-val {
    min-width: 150px;
    max-width: 180px;
    padding: 9px 10px;
    color: #e2e8f0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: #2b3340;
    line-height: 1.35;
}

/* Difference highlighting */
.cmp-m-differ .cmp-m-param {
    color: #fbbf24;
}
.cmp-m-differ .cmp-m-val {
    background: rgba(251,191,36,0.05);
}

/* Markers */
.cmp-m-val-item {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin-bottom: 2px;
}
.cmp-m-val-item:last-child {
    margin-bottom: 0;
}
.cmp-m-marker {
    display: inline-block;
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    vertical-align: top;
}
.cmp-m-val-text {
    display: inline-block;
    vertical-align: top;
}
.cmp-m-val-nomarker {
    padding-left: 18px;
}
.cmp-m-marker-yes { color: #16a34a; font-weight: 700; }
.cmp-m-marker-maybe { color: #F3BC3E; }
.cmp-m-marker-no { color: #9ca3af; }
