/* ================================================================
   EC Compare v2.1 – Stílusok
   ================================================================ */

/* ── Termékoldal gomb ── */
.ec-compare-btn--labeled {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid #d0d5dd;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 14px;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
}
.ec-compare-btn--labeled svg {
    flex-shrink: 0;
    transition: stroke 0.15s;
}
/* Hover: sötétkék háttér, fehér szöveg + ikon */
.ec-compare-btn--labeled:hover {
    border-color: #1a2b4a;
    background: #1a2b4a;
    color: #fff;
}
.ec-compare-btn--labeled:hover svg * {
    stroke: #fff;
}
/* Aktív / összehasonlításban állapot */
.ec-compare-btn--labeled.is-active {
    border-color: #1a2b4a;
    background: #1a2b4a;
    color: #fff;
}
.ec-compare-btn--labeled.is-active svg * {
    stroke: #fff;
}

/* ── Archive Item shortcode gomb ── */
.ec-compare-btn--card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    border: none;
    color: #1a2b4a;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.ec-compare-btn--card svg { width: 16px; height: 16px; }
.ec-compare-btn--card:hover {
    background: #1a2b4a;
    color: #fff;
}
.ec-compare-btn--card:hover svg * { stroke: #fff; }
.ec-compare-btn--card.is-active {
    background: #1a2b4a;
    color: #fff;
}
.ec-compare-btn--card.is-active svg * { stroke: #fff; }

/* ── Modal overlay ── */
.ec-compare-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ec-compare-modal.is-open { display: flex; }
.ec-compare-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    z-index: -1;
}
.ec-compare-modal__box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 960px;
    margin: auto;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    flex-shrink: 0;
    overflow: hidden;
}
html.ec-compare-open { overflow: hidden !important; }

/* ── Modal header ── */
.ec-compare-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 0.5px solid #e5e7eb;
}
.ec-compare-modal__header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a2b4a;
}
.ec-compare-modal__header-left h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a2b4a !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
.ec-compare-modal__count { font-size: 12px; color: #888; }
.ec-compare-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: color 0.15s;
}
.ec-compare-modal__close:hover { color: #333; }

/* ── Modal body ── */
.ec-compare-modal__body {
    padding: 16px 20px;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: auto;
}
.ec-compare-loading,
.ec-compare-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Összehasonlítás táblázat ── */
.ec-compare-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ec-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 400px;
}
.ec-compare-table th,
.ec-compare-table td {
    padding: 10px 14px;
    border-bottom: 0.5px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}
.ec-compare-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #1a2b4a;
    width: 130px;
    min-width: 130px;
    white-space: nowrap;
}
.ec-compare-table td { color: #333; min-width: 200px; }
.ec-compare-table tr:last-child th,
.ec-compare-table tr:last-child td { border-bottom: none; }

/* Termék fejléc */
.ec-compare-col-header {
    text-align: center !important;
    padding-bottom: 12px !important;
    vertical-align: top !important;
}
.ec-compare-col-header img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
    background: #f9fafb;
    border-radius: 6px;
    padding: 6px;
}
.ec-compare-col-header a {
    font-size: 12px;
    font-weight: 600;
    color: #1a2b4a;
    text-decoration: none;
    display: block;
    line-height: 1.35;
    margin-bottom: 6px;
}
.ec-compare-col-header a:hover { text-decoration: underline; }
.ec-compare-col-remove {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: 0.5px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    color: #aaa;
    font-size: 11px;
    padding: 3px 7px;
    transition: all 0.15s;
}
.ec-compare-col-remove:hover {
    background: #fee2e2;
    color: #e53e3e;
    border-color: #fca5a5;
}

/* Ár */
.ec-compare-price-cell {
    font-weight: 700 !important;
    color: #1a2b4a !important;
    font-size: 15px !important;
}
.ec-compare-price-cell .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Készlet */
.ec-compare-stock-cell { font-weight: 500; }
.ec-compare-stock-cell.in  { color: #3B6D11; }
.ec-compare-stock-cell.low { color: #854F0B; }
.ec-compare-stock-cell.out { color: #991b1b; }

/* Kosárba gomb a táblázatban */
.ec-compare-cart-btn {
    padding: 8px 16px;
    background: #1a2b4a;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.ec-compare-cart-btn:hover { background: #2d4a7a; }
.ec-compare-cart-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ec-compare-cart-btn.is-added { background: #3B6D11; }

/* Toast */
#ec-compare-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a2b4a;
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 9999999;
    opacity: 0;
    transition: all 0.25s;
    pointer-events: none;
    white-space: nowrap;
}
#ec-compare-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes ec-cmp-spin { to { transform: rotate(360deg); } }
