html { margin: 0 !important; }
body.bwdcv-frontend-editor { margin: 0; background: #f5f6fb; color: #172033; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.bwdcv-frontend-header { position: fixed; inset: 0 0 auto; z-index: 100010; min-height: 64px; box-sizing: border-box; display: flex; gap: 14px; align-items: center; padding: 10px 24px; background: #fff; border-bottom: 1px solid #e0e5ef; box-shadow: 0 3px 18px rgba(15, 23, 42, .06); }
.bwdcv-frontend-header a { color: #3730a3; text-decoration: none; }
.bwdcv-frontend-title { display: flex; flex: 1; flex-direction: column; line-height: 1.15; }
.bwdcv-frontend-title small { color: #64748b; font-size: 11px; margin-top: 3px; }
.bwdcv-frontend-header button { border: 0; border-radius: 8px; padding: 10px 16px; background: #4437e9; color: #fff; font: inherit; cursor: pointer; }
.bwdcv-frontend-header button:disabled { opacity: .6; cursor: wait; }
#bwdcv-frontend-save-status { color: #047857; font-size: 12px; font-weight: 700; max-width: 280px; }
.bwdcv-editor-loading { padding: 96px 24px; text-align: center; }
.bwdcv-frontend-view-switch { display: none; }
.bwdcv-frontend-more,
.bwdcv-mobile-toolbar,
.bwdcv-mobile-actions,
.bwdcv-mobile-sheet { display: none; }
.bwdcv-frontend-menu { background: #fff; border: 1px solid #dbe3ee; border-radius: 12px; box-shadow: 0 18px 45px rgba(15, 23, 42, .18); inset-inline-end: 16px; min-width: 210px; padding: 8px; position: absolute; top: calc(100% - 4px); }
.bwdcv-frontend-menu[hidden] { display: none !important; }
.bwdcv-frontend-menu button,
.bwdcv-frontend-menu a { align-items: center; background: transparent; border-radius: 8px; color: #172033; display: flex; font-size: 13px; justify-content: flex-start; min-height: 42px; padding: 9px 12px; width: 100%; }
.bwdcv-frontend-menu button:hover,
.bwdcv-frontend-menu a:hover { background: #eef2ff; color: #3730a3; }
.bwdcv-frontend-editor .interface-interface-skeleton { top: var(--bwdcv-header-height, 65px) !important; left: 0 !important; }
.bwdcv-frontend-editor .interface-interface-skeleton__header,
.bwdcv-frontend-editor .interface-interface-skeleton__footer,
.bwdcv-frontend-editor .editor-post-title,
.bwdcv-frontend-editor .editor-post-title__block,
.bwdcv-frontend-editor .editor-sidebar__panel-tabs,
.bwdcv-frontend-editor .block-editor-block-card,
.bwdcv-frontend-editor .block-editor-block-inspector__advanced,
.bwdcv-frontend-editor .block-editor-default-block-appender,
.bwdcv-frontend-editor .block-editor-block-contextual-toolbar,
.bwdcv-frontend-editor .editor-post-panel,
.bwdcv-frontend-editor .my-custom-buttons-container { display: none !important; }
.bwdcv-frontend-editor .interface-interface-skeleton__body { flex-direction: row-reverse; }
.bwdcv-frontend-editor .interface-interface-skeleton__sidebar { width: clamp(340px, 36vw, 550px); flex-shrink: 0; }
.bwdcv-frontend-editor .interface-complementary-area,
.bwdcv-frontend-editor .interface-complementary-area__fill { width: 100% !important; }
.bwdcv-frontend-editor .interface-interface-skeleton__content { min-width: 0; }
.bwdcv-frontend-editor .block-editor-block-inspector { padding: 18px; }
.bwdcv-frontend-editor .block-editor-block-list__layout { padding: 24px; }
.bwdcv-frontend-editor .components-popover { z-index: 100010; }
.bwdcv-frontend-editor #bwdcv-pro-live-score {
    inset-inline-end: 320px;
    top: 10px;
    z-index: 1002;
}
@media (max-width: 782px), (orientation: landscape) and (max-height: 600px) and (max-width: 900px) {
    body.bwdcv-frontend-editor { --bwdcv-editor-share: 55%; overflow: hidden; }
    .bwdcv-frontend-header { gap: 8px; min-height: 54px; padding: 7px 10px; }
    .bwdcv-frontend-back { align-items: center; display: inline-flex; font-size: 12px; font-weight: 700; gap: 3px; min-height: 44px; white-space: nowrap; }
    .bwdcv-frontend-title { display: none; }
    .bwdcv-frontend-header > #bwdcv-frontend-preview,
    .bwdcv-frontend-header > #bwdcv-frontend-save { display: none; }
    #bwdcv-frontend-save-status { flex: 1; font-size: 11px; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
    .bwdcv-frontend-view-switch { background: #eef2ff; border-radius: 10px; display: flex; gap: 2px; padding: 3px; }
    .bwdcv-frontend-view-switch button { background: transparent; color: #4338ca; font-size: 11px; min-height: 38px; min-width: 48px; padding: 7px 8px; }
    .bwdcv-frontend-view-switch button[aria-pressed="true"] { background: #4437e9; box-shadow: 0 4px 12px rgba(68, 55, 233, .22); color: #fff; }
    .bwdcv-frontend-header .bwdcv-frontend-more { align-items: center; background: #f1f5f9; color: #172033; display: inline-flex; font-size: 24px; justify-content: center; min-height: 44px; min-width: 44px; padding: 0; }
    .bwdcv-mobile-toolbar { align-items: center; background: #fff; border-bottom: 1px solid #e2e8f0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 48px; inset: var(--bwdcv-header-height, 54px) 0 auto; padding: 4px 8px; position: fixed; z-index: 100005; }
    .bwdcv-mobile-toolbar button { background: transparent; border: 0; border-radius: 8px; color: #64748b; font-size: 11px; font-weight: 750; min-height: 40px; padding: 6px 3px; }
    .bwdcv-mobile-toolbar button.is-active { background: #eef2ff; color: #4338ca; }
    .bwdcv-frontend-editor .interface-interface-skeleton { bottom: var(--bwdcv-bottom-height, 62px) !important; top: var(--bwdcv-shell-top, 102px) !important; }
    .bwdcv-frontend-editor .interface-interface-skeleton__body { display: flex; flex-direction: row; min-width: 0; overflow: hidden; position: relative; }
    .bwdcv-frontend-editor .interface-interface-skeleton__sidebar { flex: 0 0 var(--bwdcv-editor-share); height: 100%; inset: auto; min-height: 0; min-width: 0; order: 1; position: relative !important; width: var(--bwdcv-editor-share) !important; }
    .bwdcv-frontend-editor .interface-interface-skeleton__content { flex: 1 1 auto; height: 100%; min-height: 0; min-width: 0; order: 3; overflow: auto; }
    .bwdcv-mobile-divider { align-items: center; background: #e2e8f0; border: 0; cursor: col-resize; display: flex; flex: 0 0 10px; height: 100%; justify-content: center; order: 2; padding: 0; touch-action: none; width: 10px; z-index: 5; }
    .bwdcv-mobile-divider::before { background: #6366f1; border-radius: 999px; content: ""; height: 54px; width: 3px; }
	.bwdcv-frontend-editor[data-bwdcv-mobile-view="edit"] { --bwdcv-editor-share: 54%; }
	.bwdcv-frontend-editor[data-bwdcv-mobile-view="preview"] { --bwdcv-editor-share: 30%; }
	.bwdcv-frontend-editor[data-bwdcv-mobile-view="split"] { --bwdcv-editor-share: 42%; }
    .bwdcv-frontend-editor .interface-complementary-area,
    .bwdcv-frontend-editor .interface-complementary-area__fill { height: 100%; min-height: 0; }
    .bwdcv-frontend-editor .interface-complementary-area { overflow-x: hidden; }
    .bwdcv-frontend-editor .block-editor-block-inspector { padding: 8px; }
    .bwdcv-frontend-editor .components-panel__body { padding-left: 9px; padding-right: 9px; }
    .bwdcv-frontend-editor .components-base-control,
    .bwdcv-frontend-editor .components-input-control__container { max-width: 100%; min-width: 0; }
	.bwdcv-frontend-editor input,
	.bwdcv-frontend-editor select,
	.bwdcv-frontend-editor textarea { font-size: 12px !important; line-height: 1.3; min-height: 32px !important; padding-block: 4px !important; }
	.bwdcv-frontend-editor textarea { min-height: 58px !important; }
	.bwdcv-frontend-editor .components-button { font-size: 12px; min-height: 38px; padding-block: 5px; }
	.bwdcv-frontend-editor .components-base-control { margin-bottom: 8px; }
	.bwdcv-frontend-editor .components-base-control__label,
	.bwdcv-frontend-editor .components-input-control__label { font-size: 11px !important; margin-bottom: 3px !important; }
	.bwdcv-frontend-editor .components-panel__body-title .components-button { min-height: 40px; padding-block: 6px; }
	.bwdcv-frontend-editor .components-panel__body-title,
	.bwdcv-frontend-editor .components-panel__body-title .components-button,
	.bwdcv-frontend-editor .components-panel__body-title .components-button span:not(.dashicon) {
		font-size: 12px !important;
		line-height: 1.25 !important;
	}
	.bwdcv-frontend-editor .components-panel__body-title .components-button {
		font-weight: 700 !important;
		min-height: 35px !important;
		padding: 4px 7px !important;
	}
	.bwdcv-frontend-editor .components-panel__body-title .components-button svg,
	.bwdcv-frontend-editor .components-panel__body-title .components-button .dashicon {
		height: 16px !important;
		width: 16px !important;
	}
	.bwdcv-frontend-editor .bwdcvs-tab-heading .components-panel__body-title,
	.bwdcv-frontend-editor .bwdtm-repeater-item-title,
	.bwdcv-frontend-editor .bwdtm-repeater-item-title * {
		font-size: 11.5px !important;
		line-height: 1.25 !important;
	}
	.bwdcv-frontend-editor .components-panel__body { margin-bottom: 4px; }
    .bwdcv-frontend-editor iframe[name="editor-canvas"][data-bwdcv-paper-preview] {
        width: 794px !important;
        min-width: 794px !important;
        max-width: none !important;
        height: calc(100% / var(--bwdcv-paper-scale, 1)) !important;
        zoom: var(--bwdcv-paper-scale, 1);
        transform: none !important;
        transform-origin: top left;
    }
    .bwdcv-frontend-editor .block-editor-block-list__layout { padding: 8px; }
    .bwdcv-frontend-editor #bwdcv-pro-live-score {
        inset-inline-end: 8px;
        top: calc(var(--bwdcv-header-height, 54px) + 54px);
    }
    .bwdcv-mobile-actions { align-items: stretch; background: #fff; border-top: 1px solid #dbe3ee; bottom: 0; box-shadow: 0 -6px 22px rgba(15, 23, 42, .08); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: var(--bwdcv-bottom-height, 62px); inset-inline: 0; padding: 4px max(6px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); position: fixed; z-index: 100006; }
    .bwdcv-mobile-actions button { align-items: center; background: transparent; border: 0; border-radius: 8px; color: #475569; display: flex; flex-direction: column; font-size: 10px; font-weight: 700; gap: 1px; justify-content: center; min-height: 50px; }
    .bwdcv-mobile-actions button span { color: #4338ca; font-size: 20px; line-height: 1; }
    .bwdcv-mobile-actions button:active { background: #eef2ff; }
    .bwdcv-mobile-sheet { inset: 0; position: fixed; z-index: 100100; }
    .bwdcv-mobile-sheet:not([hidden]) { display: block; }
    .bwdcv-mobile-sheet-backdrop { background: rgba(15, 23, 42, .48); border: 0; inset: 0; position: absolute; width: 100%; }
    .bwdcv-mobile-sheet > section { background: #fff; border-radius: 20px 20px 0 0; bottom: 0; box-shadow: 0 -16px 42px rgba(15, 23, 42, .22); inset-inline: 0; max-height: min(72dvh, 620px); overflow: auto; padding: 0 16px calc(18px + env(safe-area-inset-bottom)); position: absolute; }
    .bwdcv-mobile-sheet > section > header { align-items: center; background: #fff; display: flex; justify-content: space-between; padding: 16px 0 10px; position: sticky; top: 0; }
    .bwdcv-mobile-sheet > section > header button { align-items: center; background: #f1f5f9; border: 0; border-radius: 999px; display: flex; font-size: 24px; height: 44px; justify-content: center; width: 44px; }
    [data-bwdcv-sheet-options] { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [data-bwdcv-sheet-options] button { background: #f8fafc; border: 1px solid #dbe3ee; border-radius: 12px; color: #172033; font-size: 12px; font-weight: 700; min-height: 48px; padding: 9px; text-align: start; }
}
@media (max-width: 390px) {
	.bwdcv-frontend-editor[data-bwdcv-mobile-view="split"] { --bwdcv-editor-share: 44%; }
	.bwdcv-frontend-header { gap: 5px; padding-inline: 6px; }
	.bwdcv-frontend-back { font-size: 10.5px; gap: 2px; }
	.bwdcv-frontend-view-switch button { min-width: 43px; padding-inline: 5px; }
	#bwdcv-frontend-save-status { font-size: 9.5px; max-width: 47px; }
}
@media (min-width: 391px) and (max-width: 600px) {
	.bwdcv-frontend-editor[data-bwdcv-mobile-view="split"] { --bwdcv-editor-share: 42%; }
}
@media (min-width: 601px) and (max-width: 782px) {
    .bwdcv-frontend-editor[data-bwdcv-mobile-view="split"] { --bwdcv-editor-share: 42%; }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 900px) {
    .bwdcv-frontend-editor[data-bwdcv-mobile-view="split"] { --bwdcv-editor-share: 40%; }
    .bwdcv-mobile-toolbar { height: 44px; }
    .bwdcv-mobile-actions { --bwdcv-bottom-height: 54px; }
    .bwdcv-mobile-actions button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .bwdcv-frontend-header *,
    .bwdcv-mobile-sheet * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
    .bwdcv-frontend-header,
    .bwdcv-mobile-toolbar,
    .bwdcv-mobile-actions,
    .bwdcv-mobile-sheet { display: none !important; }
    .bwdcv-frontend-editor .interface-interface-skeleton { inset: 0 !important; }
    }
