



#wpe-float-btn {
    position: fixed;
    left: 18px;
    right: auto;
    bottom: 18px;
    z-index: 999998;
    display: inline-grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #223c6a;
    color: #fff;
    box-shadow: 0 8px 22px rgba(20, 36, 64, 0.22);
    font: 700 14px/1 Arial, sans-serif;
    cursor: pointer;
}

#wpe-float-btn svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.page-home #wpe-float-btn::before {
    content: none !important;
}

#wpe-float-btn:hover,
#wpe-float-btn:focus {
    background: #142440;
    outline: 2px solid rgba(239, 150, 24, 0.65);
    outline-offset: 2px;
}

#wpe-float-btn.wpe-active-mode {
    background: #ef9618;
    color: #142440;
}



.wpe-text.wpe-editing-active {
    outline: 2px dashed #ef9618 !important;
    outline-offset: 3px;
    background: rgba(239, 150, 24, 0.14);
    cursor: text;
}

body.wpe-move-mode .wpe-text.wpe-editing-active {
    outline-color: #0b74c9 !important;
    background: rgba(11, 116, 201, 0.10);
    cursor: default;
}

body.wpe-free-drag-mode .wpe-text.wpe-editing-active {
    outline-color: #12612f !important;
    background: rgba(18, 97, 47, 0.10);
    cursor: default;
}

.wpe-text.wpe-editing-active:focus {
    outline-style: solid !important;
    background: rgba(34, 60, 106, 0.12);
}

.wpe-text.wpe-dirty {
    background: rgba(40, 167, 69, 0.16);
}



.wpe-move-root {
    position: relative;
}

.wpe-drag-handle {
    position: absolute;
    top: -10px;
    left: -14px;
    z-index: 999997;
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(34, 60, 106, 0.22);
    border-radius: 6px;
    background: #fff;
    color: #223c6a;
    box-shadow: 0 6px 16px rgba(20, 36, 64, 0.18);
    font: 900 15px/1 Arial, sans-serif;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpe-drag-handle:hover,
.wpe-drag-handle:focus {
    border-color: #ef9618;
    color: #142440;
    outline: 2px solid rgba(239, 150, 24, 0.28);
    outline-offset: 2px;
}

.wpe-drag-handle:active {
    cursor: grabbing;
}

.wpe-dragging {
    opacity: 0.28;
    box-shadow: 0 14px 34px rgba(20, 36, 64, 0.18);
}

.wpe-free-position,
[data-wpe-free-position="1"] {
    --move-x: 0px;
    --move-y: 0px;
}

@media (min-width: 769px) {
    .wpe-free-position,
    [data-wpe-free-position="1"] {
        position: relative;
        transform: translate(var(--move-x), var(--move-y));
        transition: transform 0.12s ease;
        z-index: 1;
    }

    body.wpe-free-drag-mode .wpe-free-position,
    body.wpe-free-drag-mode [data-wpe-free-position="1"] {
        transition: none;
    }

    .wpe-free-dragging {
        z-index: 10 !important;
        box-shadow: 0 18px 44px rgba(20, 36, 64, 0.24);
    }
}

.wpe-drag-ghost {
    position: fixed !important;
    z-index: 1000000 !important;
    pointer-events: none !important;
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    border: 1px solid rgba(34, 60, 106, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(20, 36, 64, 0.26);
    opacity: 0.94;
    transform: rotate(-0.4deg);
}

.wpe-is-pointer-moving,
.wpe-is-pointer-moving * {
    cursor: grabbing !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.wpe-drop-marker {
    height: 4px;
    margin: 8px 0;
    border-radius: 999px;
    background: #0b74c9;
    box-shadow: 0 0 0 3px rgba(11, 116, 201, 0.14);
    transition: opacity 0.15s ease;
}

.wpe-drop-target {
    outline: 2px solid rgba(11, 116, 201, 0.22);
    outline-offset: 6px;
}



#wpe-editor-bar {
    position: fixed;
    right: 18px;
    bottom: 72px;
    z-index: 999998;
    width: 310px;
    max-width: calc(100vw - 36px);
    padding: 14px;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 36, 64, 0.2);
    font-family: Arial, sans-serif;
}

.wpe-bar-title {
    margin-bottom: 8px;
    color: #142440;
    font-size: 14px;
    font-weight: 700;
}

.wpe-status {
    min-height: 18px;
    margin-bottom: 10px;
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
}

.wpe-status.ok { color: #12612f; }
.wpe-status.pending { color: #915f00; }
.wpe-status.error { color: #b42318; }

.wpe-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin: 0 0 10px;
    padding: 4px;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #f4f7fb;
}

@media (max-width: 768px) {
  .wpe-free-position,
  [data-wpe-free-position="1"] {
    transform: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
  }
}

.wpe-mode-tab {
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font: 700 13px/1 Arial, sans-serif;
    cursor: pointer;
}

.wpe-mode-tab:hover,
.wpe-mode-tab:focus {
    color: #142440;
    outline: 2px solid rgba(239, 150, 24, 0.32);
    outline-offset: 1px;
}

.wpe-mode-tab.is-active {
    background: #223c6a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(20, 36, 64, 0.18);
}

.wpe-bar-actions,
.wpe-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wpe-btn-save,
.wpe-btn-cancel,
.wpe-btn-action {
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    font: 700 13px/1 Arial, sans-serif;
    cursor: pointer;
}

#wpe-undo-btn,
#wpe-redo-btn {
    flex: 1 1 92px;
}

.wpe-btn-save,
.wpe-btn-action {
    flex: 1;
    background: #223c6a;
    color: #fff;
}

.wpe-btn-save:hover,
.wpe-btn-action:hover {
    background: #142440;
}

.wpe-btn-save:disabled {
    background: #64748b;
    cursor: wait;
}

.wpe-btn-cancel {
    flex: 1;
    background: #e5e7eb;
    color: #142440;
}

.wpe-btn-cancel:hover {
    background: #d8e0ec;
}



#wpe-mini-toolbar {
    position: fixed;
    z-index: 999999;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 36, 64, 0.18);
    font-family: Arial, sans-serif;
}

#wpe-mini-toolbar.wpe-mt-visible {
    display: flex;
}

.wpe-mt-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #d8e0ec;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    color: #142440;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0;
    transition: background 0.2s;
}

.wpe-mt-btn:hover {
    background: #f0f4f8;
    border-color: #223c6a;
}

.wpe-mt-btn.wpe-mt-active {
    background: #223c6a;
    color: #fff;
    border-color: #223c6a;
}

.wpe-mt-btn--bold {
    font-weight: bold;
}

.wpe-mt-separator {
    width: 1px;
    height: 20px;
    background: #d8e0ec;
    margin: 0 4px;
}

.wpe-mt-select {
    height: 28px;
    border: 1px solid #d8e0ec;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    padding: 0 4px;
    color: #142440;
    font-size: 12px;
}

.wpe-mt-color {
    width: 28px;
    height: 28px;
    border: 1px solid #d8e0ec;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    outline: none;
    box-sizing: border-box;
}

.wpe-mt-link-input {
    height: 26px;
    width: 150px;
    border: 1px solid #d8e0ec;
    border-radius: 4px;
    padding: 0 6px;
    font-size: 12px;
    color: #142440;
}

.wpe-mt-link-apply {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #223c6a;
    background: #223c6a;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.2s;
}

.wpe-mt-link-apply:hover {
    background: #142440;
}

.wpe-mt-link-remove {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #ef9618;
    background: #ef9618;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: none;
    transition: background 0.2s;
}

.wpe-mt-link-remove:hover {
    background: #d48515;
}

.wpe-mt-close {
    width: 20px;
    height: 20px;
    border: 0;
    background: transparent;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #ef9618;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}



#wpe-login-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(20, 36, 64, 0.58);
    font-family: Arial, sans-serif;
}

.wpe-modal-content {
    width: 340px;
    max-width: 100%;
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(20, 36, 64, 0.32);
}

.wpe-modal-content h3 {
    margin: 0 0 16px;
    color: #142440;
    font-size: 18px;
}

.wpe-form-group {
    display: block;
    margin-bottom: 12px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.wpe-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 38px;
    margin-top: 5px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.wpe-input:focus {
    border-color: #223c6a;
    outline: 2px solid rgba(34, 60, 106, 0.18);
}

.wpe-error {
    min-height: 18px;
    margin-bottom: 10px;
    color: #b42318;
    font-size: 12px;
}



@media (max-width: 640px) {
    body.page-home #wpe-float-btn {
        left: 14px !important;
        right: auto !important;
        bottom: 14px !important;
    }

    #wpe-float-btn {
        left: 14px;
        right: auto;
        bottom: 14px;
    }

    #wpe-editor-bar {
        right: 12px;
        bottom: 62px;
        max-width: calc(100vw - 24px);
    }

    .wpe-drag-handle {
        left: -8px;
        top: -12px;
    }

    #wpe-mini-toolbar {
        left: 10px !important;
        right: 10px !important;
        bottom: 62px !important;
        top: auto !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        box-sizing: border-box !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        padding: 8px !important;
    }

    .wpe-mt-link-input {
        flex: 1 1 155px !important;
        min-width: 0 !important;
        width: auto !important;
    }
}
