/* WP Map Engine - editor styles. */
.wpmp-editor-wrap { margin-right: 20px; }
.wpmp-editor { position: relative; max-width: 1800px; }
.wpmp-head {
	display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
	margin: 12px 0 16px; padding: 10px 16px; background: #fff; border: 1px solid #dcdcde; border-radius: 4px;
}
.wpmp-head__main { display: flex; flex: 1 1 420px; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.wpmp-head__actions { display: flex; flex: none; gap: 8px; align-items: center; margin-left: auto; }
.wpmp-toolbar__extra { display: contents; }
.wpmp-toolbar__extra:empty { display: none; }
.wpmp-switch { max-width: 220px; }
.wpmp-title { flex: 1 1 160px; min-width: 140px; max-width: 320px; font-size: 16px; font-weight: 600; border-color: transparent; background: transparent; box-shadow: none; }
.wpmp-title:hover, .wpmp-title:focus { border-color: #8c8f94; background: #fff; }
.wpmp-code-wrap { display: inline-flex; flex: none; gap: 6px; align-items: center; }
.wpmp-shortcode { padding: 3px 8px; background: #f0f0f1; border-radius: 3px; font-size: 13px; white-space: nowrap; user-select: all; }
/* Fixed width: the short status text never moves the buttons. */
.wpmp-status { display: inline-flex; box-sizing: border-box; width: 112px; align-items: center; justify-content: flex-end; color: #50575e; font-size: 13px; white-space: nowrap; cursor: help; }
.wpmp-status::before { content: ""; flex: none; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #dba617; }
.wpmp-status.is-live::before { background: #00a32a; }
.wpmp-status.is-saving::before { background: #8c8f94; }
.wpmp-more { position: relative; flex: none; }
.wp-core-ui .button.wpmp-more__btn { min-width: 32px; padding: 0 6px; font-size: 18px; line-height: 1; }
.wpmp-more__menu { position: absolute; z-index: 1000; top: calc(100% + 4px); left: 0; min-width: 220px; padding: 4px 0; background: #fff; border: 1px solid #c3c4c7; border-radius: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }
.wpmp-more__menu[hidden] { display: none; }
.wpmp-more__item { display: block; width: 100%; padding: 7px 14px; border: 0; background: none; color: #1d2327; font-size: 13px; text-align: left; cursor: pointer; }
.wpmp-more__item:hover:not(:disabled), .wpmp-more__item:focus { background: #f0f6fc; color: #2271b1; outline: none; }
.wpmp-more__item:disabled { color: #a7aaad; cursor: default; }
.wpmp-more__item.is-danger:not(:disabled) { color: #b32d2e; }
.wpmp-more__sep { margin: 4px 0; border-top: 1px solid #f0f0f1; }
.wp-core-ui .button.wpmp-danger { border-color: #b32d2e; background: #d63638; color: #fff; }
.wp-core-ui .button.wpmp-danger:hover, .wp-core-ui .button.wpmp-danger:focus { border-color: #8a2424; background: #b32d2e; color: #fff; }
.wp-core-ui .button.wpmp-danger:focus { box-shadow: 0 0 0 1px #fff, 0 0 0 3px #d63638; }
/* The settings panel grows with the screen (380-600px); the preview keeps the rest. */
.wpmp-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 42%, 600px); gap: 16px; align-items: start; }
.wpmp-canvas { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 16px; position: sticky; top: 46px; }
/* One column, or too short to keep the preview in view: it scrolls with the page. */
@media (max-width: 1100px) { .wpmp-body { grid-template-columns: minmax(0, 1fr); } .wpmp-canvas { position: static; } }
@media (max-height: 700px) { .wpmp-canvas { position: static; } }
@media (max-width: 1100px), (max-height: 700px) { .wpmp-panel { max-height: none; } }
.wpmp-hint[hidden] { display: none; }
.wpmp-hint { margin: 8px 0 0; color: #646970; font-size: 12px; }
.wpmp-ed-preview .wpmp-map { margin-bottom: 0; }
.wpmp-ed-preview .wpmp-credit a { pointer-events: none; }
.wpmp-side { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; }
.wpmp-tabstrip { display: flex; align-items: stretch; border-bottom: 1px solid #dcdcde; }
.wpmp-tabs { display: flex; flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-behavior: smooth; }
.wpmp-tabs::-webkit-scrollbar { display: none; }
.wpmp-tab {
	flex: 1 0 auto; padding: 10px 5px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; font-size: 13px; color: #1d2327; white-space: nowrap;
}
.wpmp-tabs__arrow { flex: none; width: 26px; padding: 0; border: 0; background: #f6f7f7; color: #1d2327; font-size: 20px; line-height: 1; cursor: pointer; }
.wpmp-tabs__arrow[hidden] { display: none; }
.wpmp-tabs__arrow--prev { border-right: 1px solid #dcdcde; }
.wpmp-tabs__arrow--next { border-left: 1px solid #dcdcde; }
.wpmp-tabs__arrow:hover:not(:disabled) { background: #f0f0f1; color: #2271b1; }
.wpmp-tabs__arrow:disabled { color: #c3c4c7; cursor: default; }
.wpmp-tab:hover { color: #2271b1; }
.wpmp-tab.is-active { border-bottom-color: #2271b1; font-weight: 600; }
/* Premium features tab (free builds): soft blue pill behind the label. Always
   bold and the pill is a ::before, so selecting or hovering never shifts layout. */
.wpmp-tab--premium { --bg: #eef2ff; --bgh: #e0e7ff; --fg: #3858e9; --line: #3858e9; --r: 6px; position: relative; isolation: isolate; font-weight: 600; }
.wpmp-tab--premium::before { content: ""; position: absolute; inset: 6px 3px 5px; z-index: -1; border-radius: var(--r); background: var(--bg); }
.wpmp-tab--premium, .wpmp-tab--premium:hover { color: var(--fg); }
.wpmp-tab--premium:hover::before { background: var(--bgh); }
.wpmp-tab--premium.is-active { border-bottom-color: var(--line); }
.wpmp-tab:focus-visible { outline: 2px solid #2271b1; outline-offset: -2px; }
.wpmp-panel { padding: 12px 16px 16px; max-height: calc(100vh - 200px); overflow-x: hidden; overflow-y: auto; }
.wpmp-search { width: 100%; }
.wpmp-list-tools { display: flex; gap: 12px; margin: 6px 0; font-size: 12px; }
.wpmp-list { margin: 0 0 12px; max-height: 220px; overflow: auto; border: 1px solid #dcdcde; border-radius: 3px; }
.wpmp-list li { margin: 0; }
.wpmp-item {
	display: flex; gap: 8px; align-items: center; width: 100%; padding: 5px 8px; border: 0; border-bottom: 1px solid #f0f0f1; background: #fff; text-align: left; cursor: pointer;
}
.wpmp-item:hover { background: #f6f7f7; }
.wpmp-item.is-selected { background: #e7f1fa; box-shadow: inset 3px 0 0 #2271b1; }
.wpmp-swatch { flex: none; width: 14px; height: 14px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 3px; }
.wpmp-item__name { flex: 1; }
.wpmp-badges { display: flex; gap: 3px; }
.wpmp-badge { padding: 0 5px; border-radius: 8px; background: #f0f0f1; color: #50575e; font-size: 10px; line-height: 16px; }
.wpmp-form-title { margin: 8px 0 10px; font-size: 15px; }
.wpmp-section { margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid #f0f0f1; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; color: #50575e; }
.wpmp-panel > .wpmp-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.wpmp-row { margin: 0 0 12px; }
.wpmp-row__label { display: block; margin-bottom: 4px; font-weight: 600; }
.wpmp-row input[type="text"], .wpmp-row input[type="url"], .wpmp-row input[type="number"], .wpmp-row select, .wpmp-row textarea { width: 100%; max-width: 100%; }
.wpmp-row--check { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; align-items: center; }
.wpmp-row--check > input { margin: 0; }
.wpmp-row--check > label { margin: 0; }
.wpmp-row--check .wpmp-help { grid-column: 2; }
.wpmp-help { margin: 4px 0 0; color: #646970; font-size: 12px; }
.wpmp-color { display: flex; gap: 6px; align-items: center; }
.wpmp-color__picker { width: 36px; height: 30px; padding: 0 2px; border: 1px solid #8c8f94; border-radius: 3px; cursor: pointer; }
.wpmp-row .wpmp-color__text { width: 110px; font-family: monospace; }
.wpmp-color__text[aria-invalid="true"] { border-color: #d63638; }
.wpmp-empty { color: #646970; }
.wpmp-reset-area { color: #b32d2e; }
.wpmp-feats { margin: 8px 0 12px 1.4em; list-style: disc; }
.wpmp-feats li { margin-bottom: 8px; }
/* [ + / − ] chip: one unbreakable block. */
.wpmp-keys { display: inline-block; padding: 0 5px; border: 1px solid #c3c4c7; border-bottom-width: 2px; border-radius: 4px; background: #f6f7f7; color: #1d2327; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; vertical-align: 1px; }
.wpmp-keys::before { content: "[ "; color: #8c8f94; font-weight: 400; }
.wpmp-keys::after { content: " ]"; color: #8c8f94; font-weight: 400; }
/* Screenshot icon button with a hover/focus tooltip. */
.wpmp-shot-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: -3px 0; padding: 0; border: 0; border-radius: 4px; background: none; color: #8c8f94; vertical-align: middle; cursor: pointer; }
.wpmp-shot-link:hover, .wpmp-shot-link:focus-visible { background: #eef2ff; color: #3858e9; }
.wpmp-shot-link:focus-visible { outline: 2px solid #3858e9; outline-offset: 0; }
.wpmp-shot-link svg { display: block; pointer-events: none; }
/* The tip exists only while shown (an invisible one would still widen the panel) and stays inside the panel. */
.wpmp-shot-link::after { content: none; position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 10; padding: 3px 7px; border-radius: 3px; background: #1d2327; color: #fff; font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
.wpmp-shot-link:hover::after, .wpmp-shot-link:focus-visible::after { content: attr(data-tip); }
.wpmp-shot-link--end::after { left: auto; right: 0; transform: none; }
.wpmp-shot-link--start::after { left: 0; transform: none; }
.wpmp-lightbox { max-width: min(960px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); overflow: auto; }
.wpmp-lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.wpmp-lightbox figure { margin: 0; }
.wpmp-lightbox img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(92vh - 64px); object-fit: contain; margin: 0 auto; }
.wpmp-lightbox figcaption { padding: 10px 16px 12px; color: #50575e; font-size: 13px; }
.wpmp-lightbox__close { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); font-size: 22px; line-height: 1; cursor: pointer; }
.wpmp-tip-reset { margin: -6px 0 12px; font-size: 12px; }
.wpmp-restore { margin: 8px 0 0; }
.wpmp-toasts { position: fixed; right: 24px; bottom: 24px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; }
.wpmp-toast { padding: 10px 14px; border-left: 4px solid #2271b1; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15); max-width: 360px; }
.wpmp-toast--success { border-color: #00a32a; }
.wpmp-toast--error { border-color: #d63638; }
.wpmp-ed-preview-initial { display: none; }

/* Rich text fields (TinyMCE): keep pressed buttons readable. */
.wpmp-rich-wrap .wp-editor-wrap { margin: 0; }
.wpmp-rich-wrap .mce-toolbar .mce-btn.mce-active, .wpmp-rich-wrap .mce-toolbar .mce-btn.mce-active:hover, .wpmp-rich-wrap .mce-toolbar .mce-btn.mce-active:focus { border-color: #8c8f94; background: #dcdcde; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); }
.wpmp-rich-wrap .mce-toolbar .mce-btn.mce-active button, .wpmp-rich-wrap .mce-toolbar .mce-btn.mce-active i, .wpmp-rich-wrap .mce-toolbar .mce-btn.mce-active .mce-ico { color: #1d2327 !important; }
.wpmp-rich-wrap .quicktags-toolbar input.button.active { background: #dcdcde; color: #1d2327; }
.wpmp-dialog { max-width: 480px; padding: 20px 24px; border: 0; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.wpmp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.wpmp-dialog h2 { margin: 0 0 10px; font-size: 18px; color: #b32d2e; }
.wpmp-dialog__actions { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 0; }

/* Region members: one chip per area with a remove button. */
.wpmp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.wpmp-chip { display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 0 2px 0 8px; border: 1px solid #c3c4c7; border-radius: 12px; background: #f6f7f7; color: #1d2327; font-size: 12px; line-height: 22px; }
.wpmp-chip__x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; color: #646970; font-size: 15px; line-height: 1; cursor: pointer; }
.wpmp-chip__x:hover, .wpmp-chip__x:focus-visible { background: #d63638; color: #fff; outline: none; }
.wpmp-chip__x:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1; }

/* Import / Export: JSON and CSV sections share one layout. */
.wpmp-io-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.wpmp-io-row input[type="file"] { flex: 1 1 180px; min-width: 0; max-width: 100%; }
.wpmp-io-msg { display: flex; align-items: flex-start; gap: 12px; margin: 8px 0; padding: 8px 12px; border-left: 4px solid #2271b1; background: #f6f7f7; }
.wpmp-io-msg p { flex: 1; margin: 0; }
.wpmp-io-msg--success { border-color: #00a32a; background: #edfaef; }
.wpmp-io-msg--warning { border-color: #dba617; background: #fcf9e8; }
.wpmp-io-msg--error { border-color: #d63638; background: #fcf0f1; }
