/**
 * Frontend CSS for Swapan Interactive Hotspots
 * Premium responsive tooltips and hover effects for interactive images.
 */

.swapan-hotspots-container {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.swapan-hotspots-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.swapan-hotspots-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: auto;
}

/* Polygons Styles */
.swapan-hotspots-polygon {
    cursor: pointer;
    transition: fill-opacity 0.25s ease, stroke-width 0.25s ease;
}

.swapan-hotspots-polygon:hover {
    fill-opacity: 0.35 !important;
    stroke-width: 1.5px !important;
}

/* Premium Tooltip Container */
.swapan-hotspots-tooltips-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

/* Glassmorphic Tooltip Card */
.swapan-hotspots-tooltip {
    position: absolute;
    width: 250px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, calc(-100% - 14px)) scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.1), visibility 0.25s;
}

/* Tooltip Arrow */
.swapan-hotspots-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.88) transparent transparent;
    display: block;
    width: 0;
}

/* Tooltip Show State */
.swapan-hotspots-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, calc(-100% - 14px)) scale(1);
}

/* Tooltip Typography & Links */
.swapan-hotspots-tooltip-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.swapan-hotspots-tooltip-desc {
    margin: 0 0 10px 0;
    color: #cbd5e1;
    font-size: 12px;
}

.swapan-hotspots-tooltip-link {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: color 0.2s;
}

.swapan-hotspots-tooltip-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}
