/* Front‑end styles for Interactive Image Editor */

/* Wrapper around interactive image and hotspots */
.iie-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.iie-wrapper img.iie-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Hotspot overlay rectangles. Uses custom highlight colour (#ec4e64).
 * Base opacity is moderate for subtle highlight; becomes darker on hover. */
/*
 * Hotspot overlay rectangles. Base appearance is invisible so that
 * hotspots are not shown until the user hovers or activates a hotspot.
 * On hover or when the hotspot is set to .active (i.e. a popup is open)
 * the coloured border and fill are applied.
 */
.iie-frontend-hotspot {
    position: absolute;
    cursor: pointer;
    /* Start with a transparent border so the area is clickable but not
     * visible until hover/active. Using a solid transparent border also
     * prevents the layout from shifting when the border changes on hover. */
    border: 2px solid transparent;
    background-color: transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Highlight hotspots when hovered or active (overlay open). The
 * border becomes opaque and the background colour appears. */
.iie-frontend-hotspot:hover,
.iie-frontend-hotspot.active {
    background-color: rgba(236, 78, 100, 0.5);
    border-color: rgba(236, 78, 100, 1);
}

/* Fullscreen overlay when a hotspot is clicked. */
.iie-frontend-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10000;
    padding: 1rem;
    box-sizing: border-box;
}

.iie-frontend-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Popup container styling */
.iie-frontend-popup {
    background: #fff;
    color: #333;
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 80vh;
    text-align: center;
}

/* Close button */
.iie-frontend-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.iie-frontend-close:hover {
    color: #000;
}

/* Company title (pop‑up) */
.iie-frontend-title {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-weight: bold;
    text-align: center;
}

/* Booth line (pop‑up) */
.iie-frontend-booth {
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Description body (pop‑up) */
.iie-frontend-body {
    line-height: 1.4;
    text-align: center;
}

/* Tooltip container */
.iie-tooltip {
    position: absolute;
    z-index: 10001;
    background: #fff;
    border: 1px solid #ec4e64;
    padding: 0.5em;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: #333;
    pointer-events: none;
    max-width: 300px;
    display: none;
    text-align: center;
}

/* Tooltip image. No fixed max‑width so size can be set inline via JS */
.iie-tooltip img {
    display: block;
    margin: 0 auto 0.25em auto;
    max-width: none;
    height: auto;
}

/* Tooltip company line */
.iie-tooltip-company {
    font-weight: bold;
    display: block;
    margin-bottom: 0.25em;
    text-align: center;
}

/* Tooltip booth line */
.iie-tooltip-booth {
    display: block;
    margin-bottom: 0.25em;
    text-align: center;
}

/* Tooltip description */
.iie-tooltip-description {
    display: block;
    text-align: center;
}