.wpsl-full-page .wpsl-nav-wrap,
#wpsl-content-wrap.wpsl-map-shapes-editor {
    max-width: none;
}

#wpsl-content-wrap.wpsl-map-shapes-editor {
    grid-template-columns: minmax( 380px, 1fr ) 3fr;
}

#wpsl-content-wrap.wpsl-map-shapes-editor section.postbox {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: var( --wpsl-radius, 3px );
}

#wpsl-content-wrap.wpsl-map-shapes-editor section.postbox > h3 {
    position: relative;
    font-size: 14px;
    padding: 10px 20px;
    margin: 0;
    line-height: 1.4;
    border-bottom: 1px solid #ccc;
}

#wpsl-content-wrap.wpsl-map-shapes-editor section.postbox > .inside {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0;
    padding: 20px;
}


#wpsl-shapes-preview > .inside {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#wpsl-shapes-map-wrap {
    position: relative;
    display: flex;
    flex: 1;
    width: 100%;
}

#wpsl-shapes-map {
    width: 100%;
    min-height: 480px;
    border-radius: var( --wpsl-radius, 3px );
    overflow: hidden;
}

#wpsl-shapes-hover-tools {
    position: absolute;
    z-index: 900;
    display: flex;
    gap: 2px;
    padding: 2px;
    transform: translate( -50%, -50% );
    background-color: #fff;
}

#wpsl-shapes-hover-tools.wpsl-shape-tools-above {
    transform: translate( -50%, calc( -100% - 10px ) );
}

#wpsl-shapes-hover-tools[hidden] {
    display: none;
}

.wpsl-shape-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: var( --wpsl-radius, 3px );
    color: #50575e;
    cursor: pointer;
}

.wpsl-shape-tool svg,
#wpsl-shapes-undo svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.wpsl-shape-tool:hover,
.wpsl-shape-tool:focus-visible {
    background: #f0f0f1;
    color: #1d2327;
}

.wpsl-shape-tool-danger:hover,
.wpsl-shape-tool-danger:focus-visible {
    background-color: #faeaec;
    color: #b32d2e;
}

#wpsl-shapes-map-wrap {
    --wpsl-control-border: 2px solid rgba( 0, 0, 0, 0.2 );
    --wpsl-control-radius: 4px;
    --wpsl-control-shadow: none;
}

#wpsl-shapes-map-wrap[data-map-service="mapbox"] {
    --wpsl-control-border: 0;
    --wpsl-control-radius: 4px;
    --wpsl-control-shadow: 0 0 0 2px rgba( 0, 0, 0, 0.1 );
}

#wpsl-shapes-map-wrap[data-map-service="gmaps"] {
    --wpsl-control-border: 0;
    --wpsl-control-radius: 2px;
    --wpsl-control-shadow: 0 1px 4px -1px rgba( 0, 0, 0, 0.3 );
}

#wpsl-shapes-search .wpsl-search-wrap,
#wpsl-shapes-toolbar,
#wpsl-shapes-hover-tools,
#wpsl-shapes-undo {
    border: var( --wpsl-control-border );
    border-radius: var( --wpsl-control-radius );
    background-clip: padding-box;
    box-shadow: var( --wpsl-control-shadow );
}

#wpsl-shapes-map-wrap {
    --wpsl-shapes-controls-inset: 12px;
    --wpsl-shapes-search-width: 280px;
    --wpsl-shapes-toolbar-offset: 0px;
    --wpsl-shapes-toolbar-top: var( --wpsl-shapes-controls-inset );
}

#wpsl-shapes-map-wrap.wpsl-shapes-controls-stacked #wpsl-shapes-toolbar {
    left: var( --wpsl-shapes-controls-inset );
    transform: none;
}

#wpsl-shapes-search {
    position: absolute;
    top: var( --wpsl-shapes-controls-inset );
    left: var( --wpsl-shapes-controls-inset );
    z-index: 1100;
    width: var( --wpsl-shapes-search-width );
    max-width: calc( 100% - var( --wpsl-shapes-controls-inset ) * 2 );
}

#wpsl-shapes-search .wpsl-search-wrap {
    display: flex;
    align-items: stretch;
    height: 40px;
    box-sizing: border-box;
    background-color: #fff;
    overflow: hidden;
}

#wpsl-shapes-search input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    box-sizing: border-box;
    font-size: 13px;
    line-height: normal;
}

#wpsl-shapes-search .wpsl-search-wrap input[type="text"],
#wpsl-shapes-search .wpsl-search-wrap input[type="text"]:hover,
#wpsl-shapes-search .wpsl-search-wrap input[type="text"]:focus,
#wpsl-shapes-search .wpsl-search-wrap input[type="text"]:focus-visible,
#wpsl-shapes-search .wpsl-search-wrap input[type="text"]:active {
    border: 0;
    box-shadow: none;
    outline: none;
}

#wpsl-shapes-search .wpsl-search-wrap:has( input[type="text"]:focus-visible ) {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

#wpsl-shapes-search input[type="text"]::placeholder {
    color: #9ca3af;
}

#wpsl-shapes-search .wpsl-search-action-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
}

#wpsl-shapes-clear-wrapper {
    border-inline-end: 1px solid #ccc;
}

#wpsl-shapes-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #50575e;
    cursor: pointer;
}

#wpsl-shapes-search button:hover {
    background: #f4f4f4;
    color: #1d2327;
}

#wpsl-shapes-submit-wrapper #wpsl-shapes-search-btn {
    background: linear-gradient( 180deg, #f4f4f4 0%, #e6e6e6 100% );
    color: #333;
}

#wpsl-shapes-submit-wrapper #wpsl-shapes-search-btn:hover {
    background: linear-gradient( 180deg, #f4f4f4 0%, #d8d8d8 100% );
}

#wpsl-shapes-submit-wrapper #wpsl-shapes-search-btn svg {
    color: #6b7280;
}

#wpsl-shapes-search button:focus-visible {
    outline: 1px solid #3b82f6;
    outline-offset: -2px;
}

#wpsl-shapes-search button svg {
    width: 16px;
    height: 16px;
}

#wpsl-shapes-search #wpsl-shapes-search-preloader {
    width: 16px;
    height: 16px;
    margin: 0;
}

#wpsl-shapes-submit-wrapper #wpsl-shapes-search-btn svg {
    width: 20px;
    height: 20px;
}

#wpsl-shapes-search button[disabled] {
    opacity: 0.5;
    cursor: default;
}

#wpsl-shapes-search .wpsl-search-wrap.wpsl-error {
    border: 1px solid #bd0028;
}

#wpsl-shapes-toolbar {
    position: absolute;
    top: var( --wpsl-shapes-toolbar-top );
    left: calc( 50% + var( --wpsl-shapes-toolbar-offset ) );
    transform: translateX( -50% );
    z-index: 1100;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    background-color: #fff;
    overflow: hidden;
}

#wpsl-shapes-toolbar .button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #6b7280;
    box-shadow: none;
    line-height: 1;
}

#wpsl-shapes-map-wrap #wpsl-shapes-toolbar .button {
    padding: 0;
}

#wpsl-shapes-toolbar .button + .button {
    border-left: 1px solid #ccc;
}

#wpsl-shapes-toolbar .button:hover {
    background: #f4f4f4;
    color: #1d2327;
}

#wpsl-shapes-toolbar .button svg {
    width: 20px;
    height: 20px;
    margin: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

#wpsl-shapes-toolbar .button[aria-pressed="true"] {
    background: #2271b1;
    color: #fff;
}

#wpsl-shapes-instructions {
    margin-top: 0;
}

.wpsl-shape-handle {
    box-sizing: border-box;
    width: 10px;
    height: 10px;
    border: 1px solid #2271b1;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 );
    cursor: pointer;
}

.wpsl-shape-handle:hover {
    background: #2271b1;
}

.wpsl-shape-handle.wpsl-shape-resize-handle {
    cursor: move;
}

.wpsl-shape-handle.wpsl-shape-midpoint-handle {
    width: 7px;
    height: 7px;
    border-color: rgba( 34, 113, 177, 0.55 );
    background: rgba( 255, 255, 255, 0.7 );
    box-shadow: none;
    transition: width 80ms ease, height 80ms ease;
}

.wpsl-shape-handle.wpsl-shape-midpoint-handle:hover {
    width: 10px;
    height: 10px;
    border-color: #2271b1;
    background: #2271b1;
    box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 );
}

.wpsl-shape-move-handle {
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #2271b1;
    box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.4 );
    cursor: move;
}

.wpsl-shape-move-handle:hover {
    background: #135e96;
}

#wpsl-shapes-map .leaflet-tile-pane,
#wpsl-shapes-map .leaflet-gl-layer {
    pointer-events: none;
}

.leaflet-container .marker-icon,
.leaflet-container .marker-icon-middle {
    width: 10px !important;
    height: 10px !important;
    margin: -5px 0 0 -5px !important;
}

#wpsl-shapes-map img[src*="undo_poly"] {
    visibility: hidden !important;
}

#wpsl-shapes-style {
    margin: 0;
}

#wpsl-shapes-style p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 14px;
}

#wpsl-shapes-style p.wpsl-hide {
    display: none;
}

#wpsl-shapes-style label {
    flex: 0 0 auto;
}

.wpsl-shape-picker {
    position: relative;
    margin: 0 0 14px;
}

.wpsl-shape-select {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 0 6px 0 12px;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: var( --wpsl-radius, 3px );
    box-shadow: none;
    color: #374151;
    font-size: 14px;
    line-height: normal;
    text-align: start;
    cursor: pointer;
}

.wpsl-shape-select:hover {
    border-color: var( --wpsl-admin-border-hover, #bbbfc6 );
}

.wpsl-shape-select:focus-visible {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba( 59, 130, 246, 0.3 );
    outline: none;
}

#wpsl-shape-select-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpsl-shape-select svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#wpsl-shape-swatch,
.wpsl-shape-list-swatch {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border: 1px solid rgba( 0, 0, 0, 0.15 );
    border-radius: 2px;
}

.wpsl-shape-list-none {
    background-color: transparent;
    border-style: dashed;
}

#wpsl-shape-list {
    position: absolute;
    top: calc( 100% + 2px );
    left: 0;
    right: 0;
    z-index: 10;
    max-height: 220px;
    margin: 0;
    padding: 2px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: var( --wpsl-radius, 3px );
    box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.15 );
}

#wpsl-shape-list[hidden] {
    display: none;
}

#wpsl-shape-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 8px;
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
}

#wpsl-shape-list li:hover,
#wpsl-shape-list li:focus {
    background: #f0f0f1;
    outline: none;
}

#wpsl-shape-list li.wpsl-shape-list-inactive {
    color: #646970;
}

#wpsl-shape-list li.is-selected {
    background: #2271b1;
    color: #fff;
}

.wpsl-shape-list-hidden-tag {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 1px 6px;
    background: #f0f0f1;
    border-radius: 10px;
    color: #646970;
    font-size: 11px;
    line-height: 1.6;
}

#wpsl-shape-list li.is-selected .wpsl-shape-list-hidden-tag {
    background: rgba( 255, 255, 255, 0.25 );
    color: #fff;
}

.wpsl-shape-field {
    display: block;
    margin: 0 0 14px;
}

.wpsl-shape-field label {
    display: block;
    margin-bottom: 4px;
}

.wpsl-shape-hint {
    display: block;
    margin-top: 4px;
    color: #646970;
    font-size: 12px;
}

.wpsl-shape-error {
    display: none;
    margin-top: 4px;
    color: #b32d2e;
    font-size: 12px;
}

.wpsl-shape-error:not(:empty) {
    display: block;
}

#wpsl-shape-message {
    width: 100%;
    box-sizing: border-box;
}

.wpsl-shape-geo {
    display: flex;
    gap: 8px;
}

.wpsl-shape-geo .wpsl-shape-field {
    flex: 1 1 0;
    min-width: 0;
}

.wpsl-shape-geo.wpsl-hide,
.wpsl-shape-field.wpsl-hide {
    display: none;
}

#wpsl-shape-name,
#wpsl-shape-coords,
#wpsl-shape-center,
#wpsl-shape-radius,
#wpsl-shape-ne,
#wpsl-shape-sw {
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}

#wpsl-shape-coords {
    resize: vertical;
}

#wpsl-shapes-style .wpsl-color-picker-popup {
    margin-inline-end: 10px;
    margin-top: -10px;
}

#wpsl-shapes-style p > input[type="range"] {
    flex: 1;
    min-width: 0;
    margin: auto 0;
}

#wpsl-shapes-style input[type="range"] {
    height: 1px;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: var( --wpsl-radius, 3px );
    outline: none;
}

#wpsl-shapes-style input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #2271b1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease-in-out;
}

#wpsl-shapes-style input[type="range"]::-webkit-slider-thumb:hover {
    background: #135e96;
}

#wpsl-shapes-style input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #2271b1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease-in-out;
}

#wpsl-shapes-style input[type="range"]::-moz-range-thumb:hover {
    background: #135e96;
}

#wpsl-shapes-style input[type="range"]:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 4px;
}

#wpsl-shapes-style .wpsl-color-picker-wrapper {
    flex: 0 0 auto;
    margin-inline-start: auto;
}

#wpsl-shapes-style .wpsl-toggle-wrap {
    margin-block: auto;
    margin-inline-start: auto;
}

#wpsl-shapes-style #wpsl-shape-fill-opacity-value,
#wpsl-shapes-style #wpsl-shape-stroke-width-value {
    flex: 0 0 3.25em;
    text-align: end;
    font-variant-numeric: tabular-nums;
    color: #646970;
    margin-inline-start: 8px;
}

#wpsl-shapes-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 16px;
}

#wpsl-shapes-actions .button {
    flex: 0 0 auto;
}

#wpsl-shapes-actions #wpsl-shapes-save-preloader {
    flex: 0 0 auto;
    margin: 0;
}

#wpsl-shapes-save-preloader[hidden] {
    display: none;
}

#wpsl-shapes-status {
    flex: 0 0 100%;
    min-width: 0;
}

#wpsl-shapes-shape-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin-inline-start: auto;
}

.wpsl-shape-delete {
    flex: 0 0 auto;
    color: #b32d2e;
    border-color: #b32d2e;
}

.wpsl-shape-delete:hover,
.wpsl-shape-delete:focus {
    color: #b32d2e;
    background-color: #faeaec;
    border-color: #b32d2e;
}

#wpsl-shapes-undo {
    position: absolute;
    z-index: 1300;
    transform: translate( -50%, -100% );
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 2px;
    margin: 0;
    background-color: #fff;
    color: #50575e;
    cursor: pointer;
}

#wpsl-shapes-undo:hover,
#wpsl-shapes-undo:focus-visible {
    background-color: #f0f0f1;
    color: #1d2327;
}

#wpsl-shapes-status.wpsl-shapes-status-error {
    color: #b32d2e;
    margin-bottom: 8px;
}

#wpsl-shapes-controls .wpsl-shape-invalid,
#wpsl-shapes-controls .wpsl-shape-invalid:focus {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.ui-dialog {
    z-index: 100102;
}

.ui-widget-overlay {
    z-index: 100101;
}

#wpsl-delete-confirmation.ui-dialog-content,
#wpsl-delete-confirmation.ui-dialog-content p {
    display: block;
}

#wpsl-delete-confirmation.ui-dialog-content input[type="submit"] {
    display: inline-block;
}