/* ================================================================
   FeedHub Compare Queue — standalone styles (prefix: fhq-)
   For external portal product pages. No dependencies on host CSS.
   ================================================================ */

/* ── Button "Dodaj do porównania" ─────────────────────────── */

.fhq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid #3399ff;
    border-radius: 8px;
    background: transparent;
    color: #3399ff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1.3;
}

.fhq-btn svg {
    flex-shrink: 0;
}

.fhq-btn:hover {
    background: #3399ff;
    color: #fff;
}

.fhq-btn--active {
    background: #3399ff;
    color: #fff;
    border-color: #3399ff;
}

.fhq-btn--active:hover {
    background: #1a7de6;
    border-color: #1a7de6;
}

/* ── Floating bar ─────────────────────────────────────────── */

#fhq-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

#fhq-bar.fhq-visible {
    transform: translateY(0);
}

.fhq-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ── Slots ────────────────────────────────────────────────── */

#fhq-slots {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

#fhq-slots::-webkit-scrollbar {
    display: none;
}

.fhq-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f4;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 5px 10px;
    flex-shrink: 0;
}

.fhq-slot img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.fhq-slot-name {
    font-size: 11px;
    font-weight: 500;
    color: #44403c;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100px;
}

.fhq-slot-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    color: #a8a29e;
    font-size: 14px;
    line-height: 1;
    transition: color 0.2s ease;
}

.fhq-slot-remove:hover {
    color: #dc2626;
}

.fhq-slots-empty {
    font-size: 13px;
    color: #a8a29e;
    padding: 4px 0;
}

/* ── Bar actions ──────────────────────────────────────────── */

.fhq-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fhq-bar-count {
    font-size: 13px;
    color: #78716c;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fhq-compare-btn {
    height: 38px;
    padding: 0 20px;
    background: #3399ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fhq-compare-btn:hover:not(:disabled) {
    background: #1a7de6;
}

.fhq-compare-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fhq-bar-clear {
    height: 38px;
    padding: 0 14px;
    border: 1px solid #e5e5e5;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    color: #44403c;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.fhq-bar-clear:hover {
    background: #f5f5f4;
    border-color: #d6d3d1;
}

/* ── Toast ────────────────────────────────────────────────── */

#fhq-toast {
    position: fixed;
    bottom: 90px;
    right: 16px;
    z-index: 10001;
    padding: 12px 18px;
    border-radius: 8px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#fhq-toast.fhq-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#fhq-toast.fhq-toast-info {
    background: #3399ff;
}

#fhq-toast.fhq-toast-success {
    background: #10b981;
}

#fhq-toast.fhq-toast-error {
    background: #dc2626;
}

/* ── Responsywność ────────────────────────────────────────── */

@media (max-width: 640px) {
    .fhq-bar-inner {
        padding: 10px 14px;
        flex-wrap: wrap;
    }

    .fhq-slot-name {
        max-width: 55px;
    }

    .fhq-bar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
