.image-map-hotspot {
    position: absolute;
    background-color: rgba(255, 0, 0, 0.5); /* 半透明の赤 */
    border-radius: 0; /* 初期は四角形 */
    cursor: pointer;
}


.my-image-map-container {
    position: relative;
    width: 100%;
    height: auto;
    transform-origin: top left;
}

.my-image-map-container img {
    width: 100%;
    height: auto;
    display: block;
}

.my-image-map-container .hotspot {
    position: absolute;
    transform-origin: top left;
}

/* --- Admin UI Improvements --- */

/* Wrapper */
.image-map-ui-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-map-editor-panel {
    flex: 2;
}

.image-map-links-panel {
    flex: 1;
}

#selected-image-container {
    border: 1px solid #ddd;
    min-height: 200px;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#selected-image-container img {
    cursor: crosshair;
}

#selected-image-container .image-map-hotspot.highlight {
    border: 2px solid #000;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    opacity: 0.7;
}


/* Link Area List */
#link-areas {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.link-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-left-width: 5px;
}
.link-area.highlight {
    background-color: #fff8e1;
    border-color: #ffc107;
}

.link-area label {
    font-weight: 600;
    white-space: nowrap;
}
.link-area .link-input {
    width: 100%;
}
.link-area .button-link-delete {
    padding: 0 8px !important;
    line-height: 26px !important;
    min-height: 28px !important;
}

/*
@media (max-width: 782px) {
    .image-map-ui-wrapper {
        flex-direction: column;
    }
}
*/

.link-areas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-area {
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-area label {
    font-weight: bold;
    white-space: nowrap;
}

.link-input {
    width: 100%;
}

.remove-link-area {
    color: #a00;
    text-decoration: none;
    border: 1px solid #a00;
    background: #fbeaea;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-map-hotspot {
    border: 2px dashed #fff;
    box-sizing: border-box;
}

.image-map-hotspot.highlight {
    border-color: #ff0;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.7);
}

/* 画像の表示を正規化するためのスタイル */
.my-image-map-target-image {
    box-sizing: content-box !important;
    padding: 0 !important;
    border: none !important;
    width: 100%;
    height: auto;
    display: block;
}
