/**
 * Kinetiflo Exploded View — Diagram Overlay Styles
 */

/* ── Collapsible Panel (inside kcf-content) ── */
.kcf-ev-panel {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.kcf-ev-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 1rem;
    background: #f8fafc;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2e6f40;
    transition: background 0.15s;
}

.kcf-ev-toggle:hover {
    background: #eef2f7;
}

.kcf-ev-chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

.kcf-ev-panel.kcf-ev-collapsed .kcf-ev-chevron {
    transform: rotate(-90deg);
}

.kcf-ev-panel.kcf-ev-collapsed .kcf-ev-toggle {
    border-bottom: none;
}

.kcf-ev-body {
    padding: 1rem;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.kcf-ev-panel.kcf-ev-collapsed .kcf-ev-body {
    display: none;
}

/* ── Container ── */
.kcf-ev {
    margin-bottom: 0;
}

/* ── Info Bar ── */
.kcf-ev__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    background: #2e6f40;
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
}

.kcf-ev__info-text strong {
    font-weight: 700;
}

.kcf-ev__info-clear {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background 0.15s;
}

.kcf-ev__info-clear:hover {
    background: rgba(255,255,255,0.35);
}

/* ── Image Wrapper ── */
.kcf-ev__wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 800px;
    line-height: 0;
    user-select: none;
}

.kcf-ev__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* ── Overlay (same dimensions as image) ── */
.kcf-ev__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Hotspot Buttons ── */
.kcf-ev__hotspot {
    position: absolute;
    pointer-events: auto;
    background: rgba(46, 111, 64, 0.08);
    border: 2px solid rgba(46, 111, 64, 0.25);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, opacity 0.2s, box-shadow 0.15s;
    outline: none;
}

.kcf-ev__hotspot:hover,
.kcf-ev__hotspot--hover {
    background: rgba(46, 111, 64, 0.15);
    border-color: rgba(46, 111, 64, 0.5);
    box-shadow: 0 0 0 3px rgba(46, 111, 64, 0.12);
}

.kcf-ev__hotspot--active {
    background: rgba(46, 111, 64, 0.2);
    border-color: #2e6f40;
    box-shadow: 0 0 0 3px rgba(46, 111, 64, 0.2);
    animation: kcf-ev-pulse 1.5s ease-in-out infinite;
}

.kcf-ev__hotspot--dimmed {
    opacity: 0.3;
}

.kcf-ev__hotspot:focus-visible {
    box-shadow: 0 0 0 3px rgba(46, 111, 64, 0.4);
}

/* ── Hotspot Label ── */
.kcf-ev__label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #2e6f40;
    background: rgba(255,255,255,0.85);
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
}

.kcf-ev__hotspot--active .kcf-ev__label {
    background: #2e6f40;
    color: #fff;
}

/* ── Pulse Animation ── */
@keyframes kcf-ev-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(46, 111, 64, 0.2); }
    50%      { box-shadow: 0 0 0 6px rgba(46, 111, 64, 0.08); }
}

/* ── Two-way: highlight/dim product cards ── */
.kcf-ev__card--highlight {
    outline: 2px solid #2e6f40;
    outline-offset: 2px;
    border-radius: 6px;
}

.kcf-ev__card--dimmed {
    opacity: 0.35;
    transition: opacity 0.15s;
}

/* ── PDF Download Link ── */
.kcf-ev__pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2e6f40;
    text-decoration: none;
    border: 1px solid #2e6f4044;
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s;
}
.kcf-ev__pdf-link:hover {
    background: #f0f7f2;
    border-color: #2e6f40;
    color: #2e6f40;
}

/* ── Responsive: center the diagram ── */
@media (min-width: 900px) {
    .kcf-ev__wrapper {
        max-width: 600px;
    }
}

@media (max-width: 600px) {
    .kcf-ev__label {
        font-size: 0.55rem;
        padding: 0 3px;
    }
    .kcf-ev__info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}
