/* Frontend */
.ip-wrapper { max-width: 1000px; margin: 0 auto; }
.ip-map { position: relative; width: 100%; line-height: 0; }
.ip-map > img { width: 100%; height: auto; display: block; }
.ip-hotspot { position: absolute; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 3px solid #fff; background: #c0392b; color: #fff; cursor: pointer; transform: translate(-50%, -50%); box-shadow: 0 2px 7px rgba(0,0,0,.35); line-height: 24px; font-size: 12px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.ip-hotspot:hover, .ip-hotspot:focus, .ip-hotspot.is-active { background: #e67e22; transform: translate(-50%, -50%) scale(1.15); outline: none; }
.ip-content { margin-top: 20px; padding: 24px; background: #f6f6f6; border-radius: 8px; scroll-margin-top: 30px; }
.ip-content-placeholder { margin: 0; }
.ip-content-item[hidden], .ip-content-placeholder[hidden] { display: none; }
.ip-content-item { display: flex; gap: 22px; align-items: flex-start; }
.ip-content-item > img { width: 220px; max-width: 35%; height: auto; border-radius: 6px; }
.ip-content-copy { flex: 1; }
.ip-content h3 { margin: 0 0 10px; }
.ip-content p { line-height: 1.6; }
@media (max-width: 700px) { .ip-content-item { display: block; } .ip-content-item > img { max-width: 100%; width: 100%; margin-bottom: 15px; } .ip-hotspot { width: 26px; height: 26px; font-size: 11px; } }

/* Admin */
.ip-admin-wrap { max-width: 1200px; }
.ip-version { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 12px; background: #e8f1fb; color: #2271b1; font-size: 12px; vertical-align: middle; }
.ip-admin-card { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 22px; margin: 20px 0; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ip-admin-card h2 { margin-top: 0; }
.ip-map-source { display: flex; gap: 8px; align-items: center; }
#ip_map_image_url { flex: 1; min-width: 0; }
.ip-map-editor { position: relative; display: inline-block; max-width: 100%; margin-top: 18px; line-height: 0; background: #f6f7f7; border: 1px solid #dcdcde; }
.ip-map-editor img { display: block; max-width: 100%; height: auto; }
#ip-map-overlay { position: absolute; inset: 0; cursor: crosshair; }
.ip-admin-hotspot { position: absolute; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; background: #2271b1; color: #fff; transform: translate(-50%, -50%); cursor: grab; padding: 0; line-height: 24px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 3; }
.ip-admin-hotspot:hover, .ip-admin-hotspot.is-dragging { background: #d63638; cursor: grabbing; transform: translate(-50%, -50%) scale(1.12); }
.ip-map-hint { position: absolute; left: 10px; bottom: 10px; padding: 7px 10px; background: rgba(0,0,0,.72); color: #fff; border-radius: 4px; font-size: 12px; line-height: 1.3; pointer-events: none; }
.ip-empty-map { padding: 45px; text-align: center; color: #646970; line-height: 1.6; }
.ip-empty-map span { display: block; }
.ip-card-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.ip-hotspot-editor { border: 1px solid #dcdcde; border-radius: 7px; margin: 12px 0; overflow: hidden; background: #fbfbfc; }
.ip-hotspot-editor-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f0f0f1; border-bottom: 1px solid #dcdcde; }
.ip-hotspot-number { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #2271b1; color: #fff; font-weight: 700; font-size: 12px; }
.ip-hotspot-editor-title { flex: 1; }
.ip-hotspot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 15px; }
.ip-field { min-width: 0; }
.ip-field-wide { grid-column: 1 / -1; }
.ip-field label { display: block; margin-bottom: 5px; font-weight: 600; }
.ip-field label small { font-weight: 400; color: #646970; }
.ip-field input[type=text], .ip-field input[type=url], .ip-field input[type=number], .ip-field textarea { width: 100%; box-sizing: border-box; }
.ip-media-row { display: flex; gap: 7px; }
.ip-media-row input { flex: 1; min-width: 0; }
.ip-image-preview img { max-width: 140px; max-height: 90px; display: block; margin-top: 8px; border-radius: 4px; }
.ip-no-hotspots { padding: 20px; text-align: center; background: #f6f7f7; color: #646970; border-radius: 5px; }
.ip-shortcode-card code { display: inline-block; padding: 10px 14px; background: #f0f0f1; border-radius: 4px; font-size: 14px; }
#ip_save_button { margin-top: 5px; }
@media (max-width: 782px) { .ip-card-heading, .ip-map-source { align-items: stretch; flex-direction: column; } .ip-hotspot-grid { grid-template-columns: 1fr; } .ip-field-wide { grid-column: auto; } }

/* v0.4 hotspot shapes and custom icons */
.ip-hotspot.ip-shape-square, .ip-admin-hotspot.ip-shape-square { border-radius: 5px; }
.ip-hotspot.ip-shape-circle, .ip-admin-hotspot.ip-shape-circle { border-radius: 50%; }
.ip-hotspot.ip-shape-icon, .ip-admin-hotspot.ip-shape-icon { border-radius: 0; border: 0; background: transparent; box-shadow: none; width: 40px; height: 40px; padding: 0; }
.ip-hotspot.ip-shape-icon:hover, .ip-hotspot.ip-shape-icon:focus, .ip-hotspot.ip-shape-icon.is-active,
.ip-admin-hotspot.ip-shape-icon:hover, .ip-admin-hotspot.ip-shape-icon.is-dragging { background: transparent; }
.ip-hotspot.ip-shape-icon img, .ip-admin-hotspot.ip-shape-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ip-admin-hotspot.ip-shape-icon img { pointer-events: none; }
.ip-icon-preview img { width: 50px; height: 50px; object-fit: contain; display: block; margin-top: 8px; }
.ip-field-shape { width: 100%; max-width: 320px; }
