/**
 * Compact Price Widget (hpw) v0.3
 * Universal — works on hubs, ratings, reviews, any page
 *
 * @package MyChooz_Partners
 */

/* Container */
.hpw { display: flex; flex-direction: column; margin: 8px 0; background: #fff; border-radius: var(--mca-radius, 12px); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* Row — clickable */
.hpw-row, .hpw-row:visited, .hpw-row:link {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px;
    border-bottom: 1px solid rgba(0,0,0,.04);
    text-decoration: none; color: var(--mca-text, #1a1a1a);
    cursor: pointer; transition: all .15s; position: relative;
}
.hpw-row:last-of-type { border-bottom: none; }
.hpw-row:hover { background: #f0f7ff; transform: scale(1.01); box-shadow: 0 2px 8px rgba(0,0,0,.06); z-index: 1; }
.hpw-row:active { transform: scale(0.99); }
.hpw-row--best { background: #f6fff6; }
.hpw-row--best:hover { background: #e8f5e9; }
.hpw-row--dim, .hpw-row--dim:visited, .hpw-row--dim:link { background: #fafafa; color: #555; }
.hpw-row--dim:hover { background: #f0f0f0; }
.hpw-row--dim .hpw-price { color: #555; }

/* Name + Price + Badge */
.hpw-name { font-size: 14px; font-weight: 600; flex: 1; }
.hpw-price { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hpw-badge {
    font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
    background: #10b981; color: #fff; padding: 1px 6px; border-radius: 8px;
    margin-right: 6px; display: inline-block; vertical-align: middle; line-height: 1.6;
}

/* Dots */
.hpw-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.hpw-dot--default { background: #333; }
.hpw-dot--green { background: #2d8a4e; }
.hpw-dot--foreign { background: #e53935; }

/* Price conversion */
.hpw-price-wrap { display: inline-flex; align-items: baseline; gap: 4px; }
.hpw-price-orig { font-size: 11px; font-weight: 400; color: var(--mca-muted, #6b7280); }
.hpw-price-eq { font-size: 11px; color: #ccc; }
.hpw-price--check { font-size: 12px; color: var(--mca-muted, #6b7280); font-weight: 500; }

/* CTA Button */
.hpw-btn {
    font-size: 12px; font-weight: 600;
    border-radius: var(--mca-radius-sm, 6px); padding: 7px 14px;
    text-decoration: none; white-space: nowrap;
    pointer-events: none;
}
.hpw-btn--primary { color: #fff; background: #d32f2f; padding: 6px 14px; }
.hpw-btn--ghost { color: #fff; background: #d32f2f; padding: 6px 14px; }
.hpw-btn--dim { color: #fff; background: #d32f2f; padding: 6px 14px; opacity: .75; }

/* Extra rows — hidden in hero, visible in prices */
.hpw--hero .hpw-row--extra { display: none; }

/* Header: city + e-katalog */
.hpw-header { display: none; }
.hpw--hero .hpw-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 12px; font-size: 12px;
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.hpw-city { color: var(--mca-muted, #6b7280); white-space: nowrap; }

/* Footer */
.hpw-footer { display: none; }
.hpw--hero .hpw-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 12px; border-top: 1px solid rgba(0,0,0,.04);
    font-size: 12px; gap: 8px;
}
.hpw--hero .hpw-all, .hpw--hero .hpw-all:visited, .hpw--hero .hpw-all:link {
    font-weight: 600; color: var(--mca-muted, #6b7280); text-decoration: none; transition: color .15s;
}
.hpw--hero .hpw-all:hover { color: #d32f2f; }
.hpw-ek, .hpw-ek:visited, .hpw-ek:link {
    display: flex; align-items: center; gap: 4px;
    color: var(--mca-muted, #6b7280); text-decoration: none; white-space: nowrap; opacity: .7; transition: opacity .15s;
}
.hpw-ek img { display: block; }
.hpw-ek:hover { opacity: 1; }

/* Standalone (not in hero) — show header always, limit rows */
.hpw:not(.hpw--hero) .hpw-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; font-size: 12px; border-bottom: 1px solid rgba(0,0,0,.04); }
.hpw:not(.hpw--hero) .hpw-row--extra { display: none; }

/* Mobile */
@media (max-width: 480px) {
    .hpw-row { padding: 12px 10px; gap: 6px; }
    .hpw-name { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hpw-price { font-size: 14px; }
    .hpw-badge { font-size: 8px; padding: 1px 4px; margin-right: 4px; }
    .hpw-btn { font-size: 12px; padding: 8px 14px; }
    .hpw-header { padding: 4px 8px; font-size: 11px; }
    .hpw-ek span { font-size: 10px; }
    .hpw-dot { width: 6px; height: 6px; }
}

/* Skeleton placeholder — reserves height, prevents CLS */
.mcp-widget-ph { min-height: 120px; width: 100%; }
.mcp-skeleton {
    min-height: 120px;
    background: var(--mca-skeleton-bg, #f0f0f0);
    border-radius: var(--mca-radius, 12px);
    position: relative;
    overflow: hidden;
}
.mcp-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    animation: mcp-shimmer 1.5s infinite;
}
@keyframes mcp-shimmer { 100% { transform: translateX(100%); } }
