/* Marathi Wishes Studio – all selectors are scoped under .mws-* so the theme and ads are untouched. */

/* Bundled fonts (SIL Open Font License 1.1 – see assets/fonts/OFL-*.txt) */
@font-face { font-family: "MWS Mukta"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Mukta-Medium.woff2") format("woff2"); }
@font-face { font-family: "MWS Mukta"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/Mukta-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "MWS Kalam"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Kalam-Bold.woff2") format("woff2"); }

.mws-studio, .mws-gallery, .mws-cats, .mws-related, .mws-breadcrumb {
	--mws-accent: #c2410c;
	--mws-accent-dark: #9a3412;
	--mws-soft: #fff7ed;
	--mws-line: #fed7aa;
	--mws-ink: #1f2937;
	--mws-muted: #6b7280;
	--mws-focus: #1d4ed8;
	--mws-wa: #128c4a;
	box-sizing: border-box;
	color: var(--mws-ink);
}
.mws-studio *, .mws-gallery *, .mws-cats *, .mws-related *, .mws-breadcrumb * { box-sizing: border-box; }

/* ---------- studio layout ---------- */
.mws-studio {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin: 1.5em 0;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--mws-line);
	border-radius: 18px;
	box-shadow: 0 6px 24px rgba(194, 65, 12, .07);
	font-size: 16px;
	line-height: 1.5;
}
.mws-studio-loading { display: block; padding: 24px; text-align: center; color: var(--mws-muted); }
.mws-controls, .mws-preview { min-width: 0; }

.mws-studio .mws-field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.mws-studio .mws-label { display: block; margin: 0 0 6px; padding: 0; font-weight: 700; font-size: 1em; color: var(--mws-ink); }
.mws-studio .mws-sublabel { display: block; margin: 10px 0 4px; font-size: .9em; color: var(--mws-muted); font-weight: 600; }
.mws-studio .mws-hint { margin: 4px 0 0; font-size: .82em; color: var(--mws-muted); }
.mws-studio .mws-input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1.5px solid #d6d3d1;
	border-radius: 10px;
	background: #fff;
	color: var(--mws-ink);
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
	line-height: 1.5;
}
.mws-studio textarea.mws-input { resize: vertical; min-height: 64px; }
.mws-studio .mws-input:focus { border-color: var(--mws-accent); }
.mws-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.mws-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.mws-studio .mws-design {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	margin: 0; padding: 4px 4px 6px;
	border: 2px solid transparent; border-radius: 12px;
	background: #fafaf9; color: var(--mws-ink);
	font: inherit; font-size: .78em; font-weight: 600; line-height: 1.3;
	cursor: pointer; text-transform: none; letter-spacing: normal;
}
.mws-studio .mws-design canvas { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
/* photo backgrounds: square thumbnail crop only in the picker; the card itself keeps the full photo */
.mws-studio .mws-design-photo { background: #fff1f5; }
.mws-studio .mws-design-photo .mws-design-name::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #d6336c; vertical-align: middle; }
.mws-studio .mws-design:hover { border-color: var(--mws-line); }
.mws-studio .mws-design.mws-on { border-color: var(--mws-accent); background: var(--mws-soft); box-shadow: 0 0 0 2px rgba(194, 65, 12, .15); }
.mws-design-name { display: block; text-align: center; }

.mws-check { display: flex; align-items: center; gap: 8px; font-size: .92em; color: var(--mws-muted); cursor: pointer; }
.mws-check input { width: 18px; height: 18px; }

/* ---------- preview & actions ---------- */
.mws-studio .mws-preview-title { margin: 0 0 10px; font-size: 1.15em; line-height: 1.3; }
.mws-studio .mws-canvas {
	display: block; width: 100%; max-width: 560px; height: auto;
	margin: 0 auto; border-radius: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); background: #f5f5f4;
}
.mws-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; margin: 14px auto 0; }
.mws-studio .mws-btn {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 48px; margin: 0; padding: 10px 12px;
	border: 2px solid transparent; border-radius: 12px;
	font: inherit; font-size: .95em; font-weight: 700; line-height: 1.2; text-align: center;
	text-decoration: none; text-transform: none; letter-spacing: normal; cursor: pointer;
}
.mws-studio .mws-btn[hidden] { display: none; }
.mws-studio .mws-btn:disabled { opacity: .6; cursor: progress; }
.mws-studio .mws-btn-primary { grid-column: 1 / -1; min-height: 56px; font-size: 1.08em; background: var(--mws-accent); color: #fff; }
.mws-studio .mws-btn-primary:hover { background: var(--mws-accent-dark); color: #fff; }
.mws-studio .mws-btn-share { grid-column: 1 / -1; background: #1e40af; color: #fff; }
.mws-studio .mws-btn-wa { background: var(--mws-wa); color: #fff; }
.mws-studio .mws-btn-wa:hover { background: #0b6b37; color: #fff; }
.mws-studio .mws-btn-ghost { background: #fff; color: var(--mws-ink); border-color: #d6d3d1; }
.mws-studio .mws-btn-ghost:hover { border-color: var(--mws-accent); }
.mws-studio .mws-status { max-width: 560px; margin: 12px auto 0; min-height: 1.4em; font-size: .92em; color: #166534; font-weight: 600; }
.mws-studio .mws-status.mws-error { color: #b91c1c; }
.mws-studio .mws-share-note { max-width: 560px; margin: 8px auto 0; padding: 10px 12px; border-radius: 10px; background: var(--mws-soft); font-size: .85em; color: #57534e; }

/* ---------- category list ---------- */
.mws-cats { margin: 1.5em 0; }
.mws-cats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mws-cats li { margin: 0; }
.mws-cats a {
	display: block; height: 100%; padding: 14px 16px; border-radius: 14px;
	background: #fff; border: 1px solid var(--mws-line); color: var(--mws-ink); text-decoration: none;
}
.mws-cats a:hover { border-color: var(--mws-accent); background: var(--mws-soft); }
.mws-cats .mws-cat-name { display: block; font-weight: 800; color: var(--mws-accent-dark); margin-bottom: 2px; }
.mws-cats .mws-cat-sample { display: block; font-size: .88em; color: var(--mws-muted); line-height: 1.45; }
.mws-cats .mws-soon { display: block; padding: 14px 16px; border-radius: 14px; border: 1px dashed #d6d3d1; color: var(--mws-muted); }

/* ---------- gallery ---------- */
.mws-gallery { margin: 1.5em 0; }
.mws-gallery ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mws-gallery li { margin: 0; }
.mws-gallery a { display: block; color: var(--mws-ink); text-decoration: none; font-weight: 700; font-size: .9em; text-align: center; }
.mws-gallery canvas { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; margin-bottom: 6px; border-radius: 12px; background: #f5f5f4; box-shadow: 0 3px 10px rgba(0, 0, 0, .1); }

/* ---------- related + breadcrumb ---------- */
.mws-related { margin: 2em 0 1em; padding: 18px; border-radius: 16px; background: var(--mws-soft); }
.mws-related .mws-related-title { margin-top: 0; }
.mws-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mws-related li { margin: 0; }
.mws-related a { display: block; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--mws-line); font-weight: 700; color: var(--mws-accent-dark); text-decoration: none; }
.mws-related a:hover { border-color: var(--mws-accent); }
.mws-related .mws-related-all { margin: 14px 0 0; }
.mws-related .mws-related-all a { display: inline; padding: 0; border: 0; background: none; text-decoration: underline; }
.mws-breadcrumb { margin: 0 0 1em; font-size: .9em; }
.mws-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3em; }
.mws-breadcrumb li { margin: 0; color: var(--mws-muted); }
.mws-breadcrumb li + li::before { content: "›"; margin-right: .35em; }
.mws-breadcrumb a { color: var(--mws-accent-dark); }

/* ---------- focus, motion, small screens ---------- */
.mws-studio :focus-visible, .mws-cats a:focus-visible, .mws-gallery a:focus-visible, .mws-related a:focus-visible, .mws-breadcrumb a:focus-visible {
	outline: 3px solid var(--mws-focus); outline-offset: 2px;
}
.mws-editor-notice { padding: 10px 14px; background: #fef2f2; color: #991b1b; border-radius: 8px; }
/* two columns only when the editor itself is wide enough (class set by JS) */
.mws-studio.mws-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 860px) {
	.mws-studio { padding: 14px; }
}
@media (max-width: 480px) {
	.mws-grid2 { grid-template-columns: 1fr; }
	.mws-designs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.mws-actions { grid-template-columns: 1fr; }
}
