/**
 * VayroHub Vue.js Side-by-Side Ad Compare Matrix Styles
 * Version: 1.0.0
 */

/* 1. Card Compare Toggle Button */
.vy-card-compare-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 32px;
    padding: 0 10px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.vy-card-compare-btn:hover {
    background: #0066cc;
    border-color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.vy-card-compare-btn.is-active {
    background: #0066cc;
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.45);
}

/* 2. Floating Sticky Bottom Comparison Bar */
.vy-compare-floating-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 8px 12px 8px 20px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 999990;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
    max-width: 95vw;
}

.vy-compare-floating-bar.is-visible {
    transform: translateX(-50%) translateY(0);
}

.vy-compare-bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
}

.vy-compare-bar-badge {
    background: #0066cc;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
}

.vy-compare-bar-thumbs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vy-compare-thumb-item {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #0066cc;
    background: #1e293b;
}

.vy-compare-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vy-compare-thumb-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    width: 14px;
    height: 14px;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: 4px;
}

.vy-compare-thumb-slot {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    font-weight: 600;
}

.vy-compare-launch-btn {
    background: #0066cc;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.vy-compare-launch-btn:hover {
    background: #0052a3;
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.4);
}

.vy-compare-clear-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.vy-compare-clear-btn:hover {
    color: #ef4444;
}

/* 3. Full Comparison Matrix Modal */
.vy-compare-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vy-compare-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.vy-compare-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    animation: vyModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vyModalSlideUp {
    from { transform: translateY(30px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.vy-compare-modal-head {
    padding: 20px 28px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.vy-compare-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.vy-compare-modal-close {
    background: #e2e8f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vy-compare-modal-close:hover {
    background: #cbd5e1;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Modal Body & Matrix Table */
.vy-compare-modal-body {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    padding: 28px;
}

.vy-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.vy-compare-table th,
.vy-compare-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.vy-compare-row-label {
    width: 180px;
    min-width: 150px;
    font-weight: 700;
    font-size: 13.5px;
    color: #64748b;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    position: sticky;
    left: 0;
    z-index: 2;
}

.vy-compare-item-cell {
    min-width: 220px;
    max-width: 280px;
    background: #ffffff;
    transition: background 0.2s ease;
}

.vy-compare-item-cell:hover {
    background: #f8fafc;
}

/* Header Product Cards in Table */
.vy-compare-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 8px 0;
}

.vy-compare-product-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vy-compare-product-remove:hover {
    background: #ef4444;
    color: #ffffff;
}

.vy-compare-product-img {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.vy-compare-product-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    line-height: 1.35;
    text-decoration: none;
}

.vy-compare-product-title:hover {
    color: #0066cc;
}

/* Price Highlight */
.vy-compare-price-val {
    font-size: 17px;
    font-weight: 800;
    color: #10b981;
}

.vy-compare-price-val.is-best-price {
    color: #059669;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vy-best-price-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Specs Badges */
.vy-compare-spec-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

/* WhatsApp CTA Button */
.vy-compare-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25d366;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 10px;
    text-decoration: none;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}

.vy-compare-wa-btn:hover {
    background: #1eb954;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35);
}

/* Modal Footer */
.vy-compare-modal-foot {
    padding: 16px 28px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hide compare floating dock, buttons, and modals on mobile/tablet devices */
@media (max-width: 991px) {
    .vy-compare-floating-bar,
    .vy-card-compare-btn,
    .vy-compare-modal-backdrop {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(200%) !important;
    }
}

