/* Berry Wishes editor styles. The editor is a full-screen layer over the image page. */

/* Editor fonts (the same files editor.js loads for the canvas; declared here so the font list shows each name in its own face) */
@font-face { font-family: "BW Great Vibes"; font-weight: 400; src: url(../fonts/greatvibes-400.woff2) format("woff2"); }
@font-face { font-family: "BW Imperial Script"; font-weight: 400; src: url(../fonts/imperial-400.woff2) format("woff2"); }
@font-face { font-family: "BW Dancing Script"; font-weight: 400; src: url(../fonts/dancing-400.woff2) format("woff2"); }
@font-face { font-family: "BW Dancing Script"; font-weight: 700; src: url(../fonts/dancing-700.woff2) format("woff2"); }
@font-face { font-family: "BW Berkshire Swash"; font-weight: 400; src: url(../fonts/berkshire-400.woff2) format("woff2"); }
@font-face { font-family: "BW Sacramento"; font-weight: 400; src: url(../fonts/sacramento-400.woff2) format("woff2"); }
@font-face { font-family: "BW Caveat"; font-weight: 400; src: url(../fonts/caveat-400.woff2) format("woff2"); }
@font-face { font-family: "BW Caveat"; font-weight: 700; src: url(../fonts/caveat-700.woff2) format("woff2"); }
@font-face { font-family: "BW Playfair"; font-weight: 400; src: url(../fonts/playfair-400.woff2) format("woff2"); }
@font-face { font-family: "BW Playfair"; font-weight: 400; font-style: italic; src: url(../fonts/playfair-400i.woff2) format("woff2"); }
@font-face { font-family: "BW Playfair"; font-weight: 700; src: url(../fonts/playfair-700.woff2) format("woff2"); }
@font-face { font-family: "BW Playfair"; font-weight: 700; font-style: italic; src: url(../fonts/playfair-700i.woff2) format("woff2"); }
@font-face { font-family: "BW Abril Fatface"; font-weight: 400; src: url(../fonts/abril-400.woff2) format("woff2"); }
@font-face { font-family: "BW DM Serif"; font-weight: 400; src: url(../fonts/dmserif-400.woff2) format("woff2"); }
@font-face { font-family: "BW DM Serif"; font-weight: 400; font-style: italic; src: url(../fonts/dmserif-400i.woff2) format("woff2"); }
@font-face { font-family: "BW Instrument Serif"; font-weight: 400; src: url(../fonts/instrument-400.woff2) format("woff2"); }
@font-face { font-family: "BW Instrument Serif"; font-weight: 400; font-style: italic; src: url(../fonts/instrument-400i.woff2) format("woff2"); }
@font-face { font-family: "BW Yeseva"; font-weight: 400; src: url(../fonts/yeseva-400.woff2) format("woff2"); }
@font-face { font-family: "BW Cinzel"; font-weight: 400; src: url(../fonts/cinzel-400.woff2) format("woff2"); }
@font-face { font-family: "BW Cinzel"; font-weight: 700; src: url(../fonts/cinzel-700.woff2) format("woff2"); }
@font-face { font-family: "BW Cinzel Decorative"; font-weight: 400; src: url(../fonts/cinzeldeco-400.woff2) format("woff2"); }
@font-face { font-family: "BW Cinzel Decorative"; font-weight: 700; src: url(../fonts/cinzeldeco-700.woff2) format("woff2"); }
@font-face { font-family: "BW Lora"; font-weight: 400; src: url(../fonts/lora-400.woff2) format("woff2"); }
@font-face { font-family: "BW Lora"; font-weight: 400; font-style: italic; src: url(../fonts/lora-400i.woff2) format("woff2"); }
@font-face { font-family: "BW Lora"; font-weight: 700; src: url(../fonts/lora-700.woff2) format("woff2"); }
@font-face { font-family: "BW Lora"; font-weight: 700; font-style: italic; src: url(../fonts/lora-700i.woff2) format("woff2"); }
@font-face { font-family: "BW Baskerville"; font-weight: 400; src: url(../fonts/baskerville-400.woff2) format("woff2"); }
@font-face { font-family: "BW Baskerville"; font-weight: 400; font-style: italic; src: url(../fonts/baskerville-400i.woff2) format("woff2"); }
@font-face { font-family: "BW Baskerville"; font-weight: 700; src: url(../fonts/baskerville-700.woff2) format("woff2"); }
@font-face { font-family: "BW Nunito"; font-weight: 400; src: url(../fonts/nunito-400.woff2) format("woff2"); }
@font-face { font-family: "BW Nunito"; font-weight: 600; src: url(../fonts/nunito-600.woff2) format("woff2"); }
@font-face { font-family: "BW Nunito"; font-weight: 800; src: url(../fonts/nunito-800.woff2) format("woff2"); }

.bwe {
	--e-ink: #2A1A2E; --e-muted: #76667A; --e-line: #EADDE4; --e-berry: #9E2A5B; --e-berry-dark: #7E1F48; --e-soft: #F7E3EC; --e-paper: #FBF7F9;
	position: fixed; inset: 0; z-index: 1000; background: var(--e-paper); color: var(--e-ink);
	font-family: "BW Nunito", "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.4;
	display: flex; flex-direction: column;
	height: 100dvh;
}
.bwe[hidden] { display: none; }
html.bwe-open, html.bwe-open body { overflow: hidden; }
.bwe * { box-sizing: border-box; }
.bwe button { font-family: inherit; cursor: pointer; }
.bwe.is-busy .bwe-btn-main { opacity: .6; pointer-events: none; }

/* top bar */
.bwe-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--e-line); flex: none; }
.bwe-title { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bwe-hist { display: inline-flex; gap: 4px; margin-left: 6px; }
.bwe-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.bwe-ib { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--e-soft); color: var(--e-berry-dark); display: grid; place-items: center; padding: 0; }
.bwe-ib svg { width: 20px; height: 20px; }
.bwe-ib:disabled { opacity: .35; cursor: default; }
.bwe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--e-line); background: #fff; color: var(--e-ink); font-weight: 800; font-size: 15px; }
.bwe-btn svg { width: 19px; height: 19px; }
.bwe-btn:hover { border-color: var(--e-berry); color: var(--e-berry-dark); }
.bwe-btn-main { background: var(--e-berry); border-color: var(--e-berry); color: #fff; box-shadow: 0 6px 16px rgba(158, 42, 91, .3); }
.bwe-btn-main:hover { background: var(--e-berry-dark); color: #fff; }
.bwe-btn-wide { width: 100%; margin: 6px 0 10px; }
.bwe-btn-quiet { border-color: transparent; color: var(--e-muted); }
.bwe-link { display: block; border: 0; background: none; color: var(--e-berry); font-weight: 700; padding: 10px 0; text-decoration: underline; }

/* body: stage + side */
.bwe-body { flex: 1; display: flex; min-height: 0; }
.bwe-stage { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.bwe-bd { position: absolute; inset: 0; width: 100%; height: 100%; }
.bwe-imagebox { position: relative; z-index: 1; box-shadow: 0 30px 60px rgba(42, 26, 46, .35), 0 4px 10px rgba(42, 26, 46, .15); border-radius: 6px; touch-action: none; }
.bwe-canvas { display: block; width: 100%; height: 100%; border-radius: 6px; background: #fff; }
.bwe-hint { position: relative; z-index: 1; margin: 12px 0 0; font-size: 13px; color: rgba(42, 26, 46, .7); background: rgba(255, 255, 255, .7); padding: 5px 12px; border-radius: 999px; }
.bwe-sel { position: absolute; border: 2px solid var(--e-berry); border-radius: 4px; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }
.bwe-sel[hidden] { display: none; }
.bwe-h { position: absolute; pointer-events: auto; background: #fff; border: 2px solid var(--e-berry); border-radius: 50%; width: 18px; height: 18px; }
.bwe-h-l { left: -10px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.bwe-h-r { right: -10px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.bwe-h-c { right: -11px; bottom: -11px; width: 22px; height: 22px; cursor: nwse-resize; background: var(--e-berry); border-color: #fff; }
.bwe-aa { position: absolute; left: 50%; top: -42px; transform: translateX(-50%); pointer-events: auto; border: 0; background: var(--e-ink); color: #fff; font-weight: 800; font-size: 14px; height: 32px; padding: 0 14px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.bwe-side { width: 360px; flex: none; background: #fff; border-left: 1px solid var(--e-line); display: flex; flex-direction: column; min-height: 0; }
.bwe-tabs { display: flex; border-bottom: 1px solid var(--e-line); flex: none; }
.bwe-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border: 0; background: none; color: var(--e-muted); font-weight: 800; font-size: 14px; border-bottom: 3px solid transparent; }
.bwe-tabs button svg { width: 20px; height: 20px; }
.bwe-tabs button.is-on { color: var(--e-berry-dark); border-bottom-color: var(--e-berry); }
.bwe-tab-send { display: none !important; }
.bwe-panel { padding: 14px 18px 20px; overflow: auto; flex: 1; }
.bwe-ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bwe-ph h3 { margin: 0; font: 800 16px/1.2 inherit; font-family: inherit; }
.bwe-lab { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--e-muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.bwe-lab output { font-weight: 700; color: var(--e-ink); text-transform: none; letter-spacing: 0; }
.bwe-small { font-size: 13px; color: var(--e-muted); margin: 6px 0 10px; }
.bwe-ta { width: 100%; border: 1.5px solid var(--e-line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; color: var(--e-ink); }
.bwe-ta:focus { outline: none; border-color: var(--e-berry); }
.bwe-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 196px; overflow: auto; padding: 2px; }
.bwe-fb { border: 1.5px solid var(--e-line); background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 17px; line-height: 1.1; text-align: left; color: var(--e-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bwe-fb.is-on { border-color: var(--e-berry); background: var(--e-soft); }
.bwe-range { width: 100%; accent-color: var(--e-berry); margin: 0; }
.bwe-sws { display: flex; flex-wrap: wrap; gap: 8px; }
.bwe-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--e-line); padding: 0; cursor: pointer; position: relative; }
.bwe-sw.is-on { box-shadow: 0 0 0 2.5px var(--e-berry); }
.bwe-sw-any { background: conic-gradient(#e33, #ea3, #4c4, #39c, #a4e, #e33); overflow: hidden; }
.bwe-sw-any input { position: absolute; inset: -10px; opacity: 0; cursor: pointer; }
.bwe-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bwe-seg { display: inline-flex; border: 1.5px solid var(--e-line); border-radius: 10px; overflow: hidden; width: 100%; }
.bwe-seg button { flex: 1; height: 38px; border: 0; background: #fff; color: var(--e-ink); font-weight: 700; font-size: 14px; }
.bwe-seg button + button { border-left: 1.5px solid var(--e-line); }
.bwe-seg button.is-on { background: var(--e-ink); color: #fff; }
.bwe-seg button:disabled { color: #bbb; cursor: default; }
.bwe-foot { margin-top: 18px; }
.bwe-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.bwe-li { text-align: left; border: 1.5px solid var(--e-line); border-radius: 10px; background: #fff; padding: 10px 12px; font-size: 17px; color: var(--e-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bwe-bds { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bwe-bdb { border: 2px solid transparent; border-radius: 12px; background: #fff; padding: 4px; color: var(--e-ink); font-size: 12px; font-weight: 700; }
.bwe-bdb canvas { display: block; width: 100%; height: auto; border-radius: 8px; }
.bwe-bdb span { display: block; padding: 4px 0 2px; }
.bwe-bdb.is-on { border-color: var(--e-berry); }

/* GeneratePress gives every button a grey hover/focus (#3f4047); the editor's buttons keep their own colours. */
.bwe-ib:hover, .bwe-ib:focus { background: var(--e-soft); color: var(--e-berry-dark); }
.bwe-btn:hover, .bwe-btn:focus { background: #fff; }
.bwe-btn-main:hover, .bwe-btn-main:focus { background: var(--e-berry-dark); color: #fff; }
.bwe-btn-quiet:hover, .bwe-btn-quiet:focus { color: var(--e-berry-dark); }
.bwe-link:hover, .bwe-link:focus { background: none; color: var(--e-berry-dark); }
.bwe-aa:hover, .bwe-aa:focus { background: var(--e-ink); color: #fff; }
.bwe-tabs button:hover, .bwe-tabs button:focus { background: none; color: var(--e-berry-dark); }
.bwe-fb:hover, .bwe-fb:focus { background: #fff; color: var(--e-ink); border-color: var(--e-berry); }
.bwe-fb.is-on:hover, .bwe-fb.is-on:focus { background: var(--e-soft); }
.bwe-seg button:hover, .bwe-seg button:focus { background: #fff; color: var(--e-ink); }
.bwe-seg button.is-on:hover, .bwe-seg button.is-on:focus { background: var(--e-ink); color: #fff; }
.bwe-seg button:disabled:hover { background: #fff; color: #bbb; }
.bwe-li:hover, .bwe-li:focus { background: #fff; color: var(--e-ink); border-color: var(--e-berry); }
.bwe-bdb:hover, .bwe-bdb:focus { background: #fff; color: var(--e-ink); }
.bwe-sw:hover, .bwe-sw:focus { color: inherit; }

/* words screen */
.bwe-words { position: absolute; inset: 0; z-index: 5; background: var(--e-paper); overflow: auto; }
.bwe-words[hidden] { display: none; }
.bwe-words-in { max-width: 640px; margin: 0 auto; padding: 16px 18px 40px; }
.bwe-words-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bwe-words-top h3 { margin: 0; font-size: 20px; font-family: inherit; }
.bwe-wl { display: block; margin: 12px 0; }
.bwe-wl span { display: block; font-size: 12px; font-weight: 800; color: var(--e-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.bwe-wl textarea { width: 100%; border: 1.5px solid var(--e-line); border-radius: 14px; padding: 12px 14px; font-size: 22px; line-height: 1.25; color: var(--e-ink); background: #fff; resize: vertical; }
.bwe-wl textarea:focus { outline: none; border-color: var(--e-berry); }

/* toast */
.bwe-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 1200; background: var(--e-ink, #2A1A2E); color: #fff; padding: 12px 18px; border-radius: 999px; font: 700 14px/1.2 "BW Nunito", Arial, sans-serif; opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; text-align: center; }
.bwe-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* phones: the image fills the screen, the tools come up as a sheet, Send lives in the bottom rail */
@media (max-width: 759px) {
	.bwe-top { padding: 8px 10px; gap: 6px; }
	.bwe-title { font-size: 14px; }
	.bwe-actions .bwe-btn span { display: none; }
	.bwe-actions .bwe-btn { width: 42px; padding: 0; }
	.bwe-actions .bwe-btn-main { display: none; }
	.bwe-body { flex-direction: column; }
	.bwe-stage { flex: 1; }
	.bwe-hint { display: none; }
	.bwe-side { width: auto; border-left: 0; border-top: 1px solid var(--e-line); flex: none; }
	.bwe-panel { display: none; }
	.bwe-tabs button { height: 58px; flex-direction: column; gap: 3px; font-size: 12px; border-bottom: 0; }
	.bwe-tabs button.is-on { color: var(--e-berry-dark); }
	.bwe-tab-send { display: inline-flex !important; color: #fff !important; background: var(--e-berry) !important; margin: 7px 10px; border-radius: 999px !important; height: 44px !important; flex-direction: row !important; font-size: 15px !important; }
	.bwe-side.is-sheet .bwe-panel { display: block; position: fixed; left: 0; right: 0; bottom: 0; max-height: 62dvh; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(42, 26, 46, .25); z-index: 6; padding: 12px 16px 24px; }
	.bwe-fonts { max-height: 150px; }
	.bwe-aa { top: -40px; }
}
