/**
 * HotSpot Interactive Tagging & Companion Widget Styles
 * shoppable.test
 */

/* ==========================================================================
   1. HotSpot Image Canvas Markers & Radar Pulse Overlay
   ========================================================================== */
.hotspot-markers-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 25 !important;
}

.hotspot-marker-wrapper {
    position: absolute !important;
    width: 36px !important;
    height: 36px !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: auto !important;
    z-index: 30 !important;
}

.hotspot-marker-wrapper.is-active,
.hotspot-marker-wrapper.is-highlighted {
    z-index: 50 !important;
}

.hotspot-marker-btn {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.hotspot-marker-btn:hover,
.hotspot-marker-wrapper.is-highlighted .hotspot-marker-btn,
.hotspot-marker-wrapper.is-active .hotspot-marker-btn {
    transform: scale(1.18);
}

.hotspot-marker-pulse {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mds-color-main, #04a7bd);
    animation: hotspotRadarPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes hotspotRadarPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.hotspot-marker-circle {
    position: relative;
    width: 34px;
    height: 34px;
    background: var(--mds-color-main, #04a7bd);
    color: #ffffff;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.hotspot-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotspot-marker-icon svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    fill: none;
}

/* ==========================================================================
   2. Interactive Popover Card & Smart Placement
   ========================================================================== */
.hotspot-popover {
    position: absolute !important;
    z-index: 60 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s !important;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.15)) !important;
    width: max-content !important;
}

/* Vertical Placement */
.hotspot-popover.tooltip-bottom {
    top: calc(100% + 8px) !important;
    bottom: auto !important;
}

.hotspot-popover.tooltip-top {
    bottom: calc(100% + 8px) !important;
    top: auto !important;
}

/* Horizontal Alignment */
.hotspot-popover.tooltip-align-center {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(-4px);
}

.hotspot-popover.tooltip-align-right {
    right: -10px !important;
    left: auto !important;
    transform: translateY(-4px);
}

.hotspot-popover.tooltip-align-left {
    left: -10px !important;
    right: auto !important;
    transform: translateY(-4px);
}

/* Active & Hover States */
.hotspot-marker-wrapper:hover .hotspot-popover.tooltip-align-center,
.hotspot-marker-wrapper.is-active .hotspot-popover.tooltip-align-center,
.hotspot-marker-wrapper.is-highlighted .hotspot-popover.tooltip-align-center {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) !important;
}

.hotspot-marker-wrapper:hover .hotspot-popover.tooltip-align-right,
.hotspot-marker-wrapper.is-active .hotspot-popover.tooltip-align-right,
.hotspot-marker-wrapper.is-highlighted .hotspot-popover.tooltip-align-right,
.hotspot-marker-wrapper:hover .hotspot-popover.tooltip-align-left,
.hotspot-marker-wrapper.is-active .hotspot-popover.tooltip-align-left,
.hotspot-marker-wrapper.is-highlighted .hotspot-popover.tooltip-align-left {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* Popover 3-Column Card Layout — Guaranteed Single-Row Horizontal Columns */
.hotspot-popover-card {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    background: #ffffff !important;
    border-radius: 13px !important;
    padding: 7px 11px 7px 8px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
    color: #0f172a !important;
    position: relative !important;
    z-index: 2 !important;
    width: max-content !important;
    min-width: 190px !important;
    max-width: 320px !important;
    white-space: nowrap !important;
}

.hotspot-popover-card:hover {
    border-color: var(--mds-color-main, #04a7bd) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 28px -5px rgba(0, 0, 0, 0.18) !important;
}

/* Col 1: Thumbnail Slot */
.hotspot-popover-thumb {
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hotspot-popover-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 42px !important;
    max-height: 42px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px !important;
}

.hotspot-popover-thumb-fallback {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--mds-color-main, #04a7bd);
}

.hotspot-popover-thumb-fallback svg {
    width: 18px !important;
    height: 18px !important;
    stroke: var(--mds-color-main, #04a7bd);
}

/* Col 2: Details Slot (Stacked Title + Price Next to Thumbnail) */
.hotspot-popover-details {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 78px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    gap: 2px !important;
    overflow: hidden !important;
    text-align: left !important;
}

.hotspot-popover-title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.hotspot-popover-price {
    display: block !important;
    width: 100% !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    color: #c2410c !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Col 3: Action Arrow */
.hotspot-popover-action {
    flex: 0 0 26px !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    margin-left: auto !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.hotspot-popover-action svg {
    width: 12px !important;
    height: 12px !important;
    stroke: currentColor !important;
}

.hotspot-popover-card:hover .hotspot-popover-action {
    background: var(--mds-color-main, #04a7bd) !important;
    color: #ffffff !important;
    transform: translate(1px, -1px) !important;
}

/* ==========================================================================
   3. Companion Sidebar Widget (Tagged Items Box)
   ========================================================================== */
.hotspot-items-widget-box {
    clear: both;
    width: 100%;
    max-width: 100%;
    background: #f4f6f4 !important;
    border: none !important;
    border-radius: 12px;
    box-shadow: none !important;
    padding: 16px;
    box-sizing: border-box;
    margin-bottom: 22px;
}

.hotspot-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(22, 101, 52, 0.15);
    padding-bottom: 10px;
}

.hotspot-items-header .widget-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hotspot-items-header .widget-title i {
    color: #166534 !important;
}

.hotspot-items-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 2.5px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    line-height: 1.3;
}

.hotspot-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hotspot-item-card-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 14px 0 0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #166534 !important;
    color: #14532d !important;
    text-decoration: none !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(22, 101, 52, 0.08) !important;
    transition: border-color 0.2s ease, color 0.15s ease !important;
    box-sizing: border-box !important;
    height: 60px !important;
    min-height: 60px !important;
    filter: none !important;
    opacity: 1 !important;
}

.hotspot-item-card-btn:hover,
.hotspot-item-card-btn.is-hovered,
.hotspot-item-card-btn.is-active,
.hotspot-item-card-btn.is-highlighted {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #166534 !important;
    color: #14532d !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(22, 101, 52, 0.12) !important;
    filter: none !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

.hotspot-item-card-btn:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #dc2626 !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12) !important;
    filter: none !important;
}

.hotspot-item-thumb-slot {
    width: 58px;
    height: 58px;
    min-width: 58px;
    max-width: 58px;
    align-self: stretch;
    border-radius: 6px 0 0 6px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-right: none;
}

.hotspot-item-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hotspot-item-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #166534;
}

.hotspot-item-thumb-fallback svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.hotspot-item-card-info {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow: hidden;
    padding: 8px 0;
}

.hotspot-item-card-title {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: color 0.15s ease;
}

.hotspot-item-card-btn:hover .hotspot-item-card-title,
.hotspot-item-card-btn.is-hovered .hotspot-item-card-title,
.hotspot-item-card-btn.is-active .hotspot-item-card-title,
.hotspot-item-card-btn.is-highlighted .hotspot-item-card-title {
    color: #0f172a !important;
}

.hotspot-item-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.hotspot-item-card-price {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #c2410c !important;
    line-height: 1.2;
}

.hotspot-item-card-arrow {
    flex: 0 0 26px !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: #166534 !important;
    flex-shrink: 0;
    margin-left: auto !important;
    margin-right: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.hotspot-item-card-arrow svg {
    width: 13px !important;
    height: 13px !important;
    stroke: currentColor !important;
    display: block !important;
    transition: stroke 0.2s ease !important;
}

.hotspot-item-card-btn:hover .hotspot-item-card-arrow,
.hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow,
.hotspot-item-card-btn.is-active .hotspot-item-card-arrow,
.hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow {
    background: #166534 !important;
    color: #ffffff !important;
    transform: translate(1px, -1px) !important;
}

.hotspot-item-card-btn:hover .hotspot-item-card-arrow svg,
.hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow svg,
.hotspot-item-card-btn.is-active .hotspot-item-card-arrow svg,
.hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

.hotspot-affiliate-disclaimer {
    margin: 10px 0 0 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #64748b;
}

.hotspot-affiliate-disclaimer a {
    color: #475569;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hotspot-affiliate-disclaimer a:hover {
    color: #166534;
}

/* ==========================================================================
   4. Dark Mode Palette Support
   ========================================================================== */
[data-bs-theme="dark"] .hotspot-popover-card,
[data-theme="dark"] .hotspot-popover-card,
.dark-mode .hotspot-popover-card {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #f4f4f5 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45) !important;
}

[data-bs-theme="dark"] .hotspot-popover-title,
[data-theme="dark"] .hotspot-popover-title,
.dark-mode .hotspot-popover-title {
    color: #f4f4f5 !important;
}

[data-bs-theme="dark"] .hotspot-popover-action,
[data-theme="dark"] .hotspot-popover-action,
.dark-mode .hotspot-popover-action {
    background: #27272a !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .hotspot-items-widget-box,
[data-theme="dark"] .hotspot-items-widget-box,
.dark-mode .hotspot-items-widget-box {
    background: rgba(92, 110, 88, 0.15) !important;
    border: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .hotspot-items-header,
[data-theme="dark"] .hotspot-items-header,
.dark-mode .hotspot-items-header {
    border-bottom: 1px solid rgba(74, 222, 128, 0.15) !important;
}

[data-bs-theme="dark"] .hotspot-items-header .widget-title,
[data-theme="dark"] .hotspot-items-header .widget-title,
.dark-mode .hotspot-items-header .widget-title {
    color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .hotspot-items-header .widget-title i,
[data-theme="dark"] .hotspot-items-header .widget-title i,
.dark-mode .hotspot-items-header .widget-title i {
    color: #4ade80 !important;
}

[data-bs-theme="dark"] .hotspot-items-count-badge,
[data-theme="dark"] .hotspot-items-count-badge,
.dark-mode .hotspot-items-count-badge {
    background: rgba(74, 222, 128, 0.15) !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
    color: #4ade80 !important;
}

[data-bs-theme="dark"] .hotspot-item-card-btn,
[data-theme="dark"] .hotspot-item-card-btn,
.dark-mode .hotspot-item-card-btn {
    background: #152219 !important;
    background-color: #152219 !important;
    border: 1px solid #22c55e !important;
    color: #4ade80 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    filter: none !important;
}

[data-bs-theme="dark"] .hotspot-item-card-btn:hover,
[data-theme="dark"] .hotspot-item-card-btn:hover,
.dark-mode .hotspot-item-card-btn:hover,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-hovered,
[data-theme="dark"] .hotspot-item-card-btn.is-hovered,
.dark-mode .hotspot-item-card-btn.is-hovered,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-active,
[data-theme="dark"] .hotspot-item-card-btn.is-active,
.dark-mode .hotspot-item-card-btn.is-active,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-highlighted,
[data-theme="dark"] .hotspot-item-card-btn.is-highlighted,
.dark-mode .hotspot-item-card-btn.is-highlighted {
    background: #152219 !important;
    background-color: #152219 !important;
    border: 1px solid #22c55e !important;
    color: #4ade80 !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.2) !important;
    filter: none !important;
}

[data-bs-theme="dark"] .hotspot-item-card-title,
[data-theme="dark"] .hotspot-item-card-title,
.dark-mode .hotspot-item-card-title {
    color: #4ade80 !important;
}

[data-bs-theme="dark"] .hotspot-item-card-btn:hover .hotspot-item-card-title,
[data-theme="dark"] .hotspot-item-card-btn:hover .hotspot-item-card-title,
.dark-mode .hotspot-item-card-btn:hover .hotspot-item-card-title {
    color: #4ade80 !important;
}

[data-bs-theme="dark"] .hotspot-item-card-price,
[data-theme="dark"] .hotspot-item-card-price,
.dark-mode .hotspot-item-card-price {
    color: #86efac !important;
}

[data-bs-theme="dark"] .hotspot-item-card-arrow,
[data-theme="dark"] .hotspot-item-card-arrow,
.dark-mode .hotspot-item-card-arrow {
    background: transparent !important;
    color: #4ade80 !important;
}

[data-bs-theme="dark"] .hotspot-item-card-btn:hover .hotspot-item-card-arrow,
[data-theme="dark"] .hotspot-item-card-btn:hover .hotspot-item-card-arrow,
.dark-mode .hotspot-item-card-btn:hover .hotspot-item-card-arrow,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow,
[data-theme="dark"] .hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow,
.dark-mode .hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-active .hotspot-item-card-arrow,
[data-theme="dark"] .hotspot-item-card-btn.is-active .hotspot-item-card-arrow,
.dark-mode .hotspot-item-card-btn.is-active .hotspot-item-card-arrow,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow,
[data-theme="dark"] .hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow,
.dark-mode .hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow {
    background: #166534 !important;
    color: #ffffff !important;
    transform: translate(1px, -1px) !important;
}

[data-bs-theme="dark"] .hotspot-item-card-btn:hover .hotspot-item-card-arrow svg,
[data-theme="dark"] .hotspot-item-card-btn:hover .hotspot-item-card-arrow svg,
.dark-mode .hotspot-item-card-btn:hover .hotspot-item-card-arrow svg,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow svg,
[data-theme="dark"] .hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow svg,
.dark-mode .hotspot-item-card-btn.is-hovered .hotspot-item-card-arrow svg,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-active .hotspot-item-card-arrow svg,
[data-theme="dark"] .hotspot-item-card-btn.is-active .hotspot-item-card-arrow svg,
.dark-mode .hotspot-item-card-btn.is-active .hotspot-item-card-arrow svg,
[data-bs-theme="dark"] .hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow svg,
[data-theme="dark"] .hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow svg,
.dark-mode .hotspot-item-card-btn.is-highlighted .hotspot-item-card-arrow svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .hotspot-item-thumb-slot,
[data-theme="dark"] .hotspot-item-thumb-slot,
.dark-mode .hotspot-item-thumb-slot {
    background: transparent !important;
    border-right: none !important;
}

[data-bs-theme="dark"] .hotspot-item-thumb-fallback,
[data-bs-theme="dark"] .hotspot-item-thumb-fallback,
.dark-mode .hotspot-item-thumb-fallback {
    color: #4ade80 !important;
}

/* ==========================================================================
   5. Mobile Responsive Adjustments
   ========================================================================== */
@media (max-width: 480px) {
    .hotspot-popover-card {
        flex-wrap: nowrap !important;
        min-width: 175px !important;
        max-width: min(260px, calc(100vw - 36px)) !important;
        padding: 6px 10px 6px 7px !important;
        gap: 8px !important;
    }
    .hotspot-popover-thumb {
        flex: 0 0 38px !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        border-radius: 7px !important;
    }
    .hotspot-popover-action {
        flex: 0 0 24px !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        max-width: 24px !important;
    }
    .hotspot-popover-title {
        font-size: 12px !important;
    }
    .hotspot-popover-price {
        font-size: 12px !important;
    }
}
