/* Gaya untuk mod sunting langsung */
.wpc-live-edit-mode {
    outline: 2px dashed #0073aa !important;
    min-height: 200px;
    padding: 20px;
    cursor: text;
    max-width: none;
    width: 100%;
}

.wpc-live-edit-mode:focus {
    outline: 2px solid #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3);
}

/* Kawalan sunting */
#wpc-live-editor-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999 !important;
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    flex-wrap: wrap;
    max-width: 500px;
}

.wpc-control-btn {
    padding: 10px 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, opacity 0.3s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wpc-control-btn:hover:not(:disabled) {
    background-color: #005a87;
}

.wpc-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #999;
}

/* Butang Undo/Redo */
.wpc-control-btn#wpc-undo,
.wpc-control-btn#wpc-redo {
    background-color: #555d66;
    padding: 10px 12px;
    min-width: 45px;
}

.wpc-control-btn#wpc-undo:hover:not(:disabled),
.wpc-control-btn#wpc-redo:hover:not(:disabled) {
    background-color: #32373c;
}

/* Icon untuk butang */
.wpc-control-btn#wpc-undo::before {
    content: "↶";
    font-size: 18px;
    font-weight: bold;
}

.wpc-control-btn#wpc-redo::before {
    content: "↷";
    font-size: 18px;
    font-weight: bold;
}

.wpc-control-btn#wpc-cancel-edit {
    background-color: #737373;
}

.wpc-control-btn#wpc-cancel-edit:hover {
    background-color: #5a5a5a;
}

/* Mesej status */
.wpc-status-message {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 12px 15px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 99999 !important;
    display: none;
    max-width: 300px;
    word-wrap: break-word;
    border-left: 4px solid;
}

.wpc-status-message.success {
    background-color: #46b450;
    border-left-color: #3d9745;
}

.wpc-status-message.error {
    background-color: #dc3232;
    border-left-color: #c12626;
}

.wpc-status-message.info {
    background-color: #0073aa;
    border-left-color: #005a87;
}

/* Penunjuk mod sunting */
.wpc-edit-indicator {
    position: sticky !important;
    top: 0;
    left: 0;
    background-color: #0073aa;
    color: white;
    padding: 8px 12px;
    border-radius: 0 0 5px 0;
    font-size: 12px;
    font-weight: bold;
    z-index: 9999 !important;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

/* Elakkan konflik dengan elemen lain */
.canvas-content *[contenteditable="true"] {
    caret-color: #0073aa;
}

/* Gaya tambahan untuk antara muka yang lebih cantik */
body.admin-bar .wpc-live-edit-mode {
    margin-top: 32px; /* Sesuaikan dengan tinggi admin bar */
}

/* Pastikan kandungan mengambil lebar penuh */
.canvas-content {
    width: 100% !important;
    max-width: 100% !important;
}