/* The Wedding card maker (src/components/WeddingCardMaker.astro): it uses the look of the Biodata maker (biodata.css); only the rows of the events are its own. */
.wc-ev { display: grid; grid-template-columns: 1.1fr 1fr 0.8fr 1.4fr 44px; gap: 8px; margin-bottom: 8px; }
.wc-ev input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.wc-ev input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.wc-venue { margin-top: 12px; }
/* on a phone each event is a small card: name and ✕, then date and time, then the place */
@media (max-width: 720px) {
  .wc-ev { grid-template-columns: 1fr 1fr 44px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); }
  .wc-ev input[data-ev="n"] { grid-column: 1 / 3; grid-row: 1; }
  .wc-ev .bd-x { grid-column: 3; grid-row: 1; }
  .wc-ev input[data-ev="d"] { grid-column: 1; grid-row: 2; }
  .wc-ev input[data-ev="t"] { grid-column: 2 / 4; grid-row: 2; }
  .wc-ev input[data-ev="v"] { grid-column: 1 / -1; grid-row: 3; }
}

/* the colours of the card: round swatches that wrap, and "my own colour" with a colour picker */
.wc-themes { display: flex; flex-wrap: wrap; gap: 10px 8px; margin-bottom: 14px; }
.wc-theme { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; cursor: pointer; text-align: center; }
.wc-theme input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.wc-theme span, .wc-theme input[type="color"] { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--border); padding: 0; background: none; cursor: pointer; }
.wc-theme input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } .wc-theme input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.wc-theme b { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--text-2); }
.wc-theme input[type="radio"]:checked ~ span, .wc-theme input[type="radio"]:checked ~ input[type="color"] { box-shadow: 0 0 0 3px var(--accent); }
.wc-theme input[type="radio"]:focus-visible ~ span { outline: 3px solid var(--accent); outline-offset: 2px; }
.wc-look { margin-top: 12px; }
.wc-cd { margin-top: 14px; }
.bd-f input[type="range"] { min-height: 46px; padding: 0; accent-color: var(--accent); }

/* the cartoons of the couple: small pictures to tap, like the designs */
.wc-arts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.wc-art { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; text-align: center; }
.wc-art input { position: absolute; opacity: 0; pointer-events: none; }
.wc-art span { display: grid; place-items: center; width: 100%; aspect-ratio: 6 / 5; border-radius: 12px; background: #fffaf0; border: 1px solid var(--border); overflow: hidden; }
.wc-art canvas { width: 100%; height: 100%; }
.wc-art i { font-style: normal; font-size: 26px; color: #9a6b00; }
.wc-art b { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--text-2); }
.wc-art input:checked ~ span { box-shadow: 0 0 0 3px var(--accent); border-color: transparent; }
.wc-art input:focus-visible ~ span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* the photos: one of the couple, or the bride's and the groom's side by side; each with a box to drag it in its frame, a zoom and "remove background" */
.wc-modes { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.wc-mode { flex: 1 1 140px; cursor: pointer; }
.wc-mode input { position: absolute; opacity: 0; pointer-events: none; }
.wc-mode span { display: block; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; text-align: center; font-weight: 600; font-size: 14px; background: var(--bg); }
.wc-mode input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wc-mode input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.wc-pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.wc-pic { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); }
.wc-pic[hidden] { display: none; }
.wc-pic-t { font-size: 14px; }
.wc-pic-empty { display: grid; place-items: center; gap: 4px; aspect-ratio: 1; border: 2px dashed var(--border); border-radius: 12px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; text-align: center; padding: 8px; }
.wc-pic-empty span { font-size: 30px; color: var(--accent); line-height: 1; }
.wc-pic-empty[hidden], .wc-pic-full[hidden] { display: none; }
.wc-pic-full { display: flex; flex-direction: column; gap: 8px; }
.wc-pic-c { width: 100%; max-width: 260px; aspect-ratio: 1; align-self: center; touch-action: none; cursor: grab; border-radius: 12px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 20px 20px; }
.wc-pic-c:active { cursor: grabbing; }
.wc-pic .bd-photo-row { flex-wrap: wrap; gap: 6px; }
.wc-pic .bd-btn { min-height: 44px; font-size: 13.5px; padding: 8px 12px; }

/* how the cartoon couple looks: three colours, each with "in the card's colours" */
.wc-sub { margin: 14px 0 6px; font-size: 14px; }
.wc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.wc-col { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.wc-col div { display: flex; align-items: center; gap: 8px; }
.wc-col input[type="color"] { width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: none; cursor: pointer; }
.wc-col input.unset { opacity: 0.35; }

/* The mandap look: the page is warm and festive (maroon, saffron and gold), the tool opens under a toran, and the card stands in a mandap
   (src/components/WeddingDecor.astro draws the toran, the roof and the steps; the pillars are here). Colours for the dark and the light page. */
.wc {
  --wc-gold: #eab308;
  --bg: #17070e; --bg-2: #230c17; --border: #5c2536; --accent: #fbbf24; --text-2: #d2ada0;
  --sp-btn: linear-gradient(100deg, #be123c, #e11d48 45%, #f97316); --sp-btn-solid: #be123c;
  --wc-paisley: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23fbbf24' stroke-opacity='.09' stroke-width='2'%3E%3Cpath d='M30 70c-14-2-20-20-8-30 14-12 36 0 30 22-4 16-20 26-38 22 12-2 22-8 16-14z'/%3E%3Ccircle cx='34' cy='50' r='5'/%3E%3Cpath d='M90 20c6 6 6 14 0 20-6-6-6-14 0-20zM80 30c6 0 10 4 10 10-6 0-10-4-10-10zM100 30c-6 0-10 4-10 10 6 0 10-4 10-10z'/%3E%3C/g%3E%3Cg fill='%23fbbf24' fill-opacity='.1'%3E%3Ccircle cx='90' cy='90' r='3'/%3E%3Ccircle cx='76' cy='100' r='2'/%3E%3Ccircle cx='104' cy='100' r='2'/%3E%3C/g%3E%3C/svg%3E");
  --wc-back: linear-gradient(165deg, #3d0a1d 0%, #2a0a26 48%, #3a1607 100%);
  padding: 0 14px 20px; border-radius: 22px; overflow: clip; background: var(--wc-paisley), var(--wc-back);
  border: 1px solid color-mix(in srgb, var(--wc-gold) 45%, transparent); box-shadow: 0 30px 70px -40px rgba(225, 29, 72, .55);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .wc { --bg: #fff; --bg-2: #fffaf2; --border: #efc79e; --accent: #b4235a; --text-2: #7a4636;
    --wc-paisley: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23be123c' stroke-opacity='.08' stroke-width='2'%3E%3Cpath d='M30 70c-14-2-20-20-8-30 14-12 36 0 30 22-4 16-20 26-38 22 12-2 22-8 16-14z'/%3E%3Ccircle cx='34' cy='50' r='5'/%3E%3Cpath d='M90 20c6 6 6 14 0 20-6-6-6-14 0-20zM80 30c6 0 10 4 10 10-6 0-10-4-10-10zM100 30c-6 0-10 4-10 10 6 0 10-4 10-10z'/%3E%3C/g%3E%3Cg fill='%23f97316' fill-opacity='.12'%3E%3Ccircle cx='90' cy='90' r='3'/%3E%3Ccircle cx='76' cy='100' r='2'/%3E%3Ccircle cx='104' cy='100' r='2'/%3E%3C/g%3E%3C/svg%3E");
    --wc-back: linear-gradient(165deg, #fff0dc 0%, #ffe3ec 50%, #fff5d1 100%); }
}
:root[data-theme="light"] .wc { --bg: #fff; --bg-2: #fffaf2; --border: #efc79e; --accent: #b4235a; --text-2: #7a4636;
  --wc-paisley: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23be123c' stroke-opacity='.08' stroke-width='2'%3E%3Cpath d='M30 70c-14-2-20-20-8-30 14-12 36 0 30 22-4 16-20 26-38 22 12-2 22-8 16-14z'/%3E%3Ccircle cx='34' cy='50' r='5'/%3E%3Cpath d='M90 20c6 6 6 14 0 20-6-6-6-14 0-20zM80 30c6 0 10 4 10 10-6 0-10-4-10-10zM100 30c-6 0-10 4-10 10 6 0 10-4 10-10z'/%3E%3C/g%3E%3Cg fill='%23f97316' fill-opacity='.12'%3E%3Ccircle cx='90' cy='90' r='3'/%3E%3Ccircle cx='76' cy='100' r='2'/%3E%3Ccircle cx='104' cy='100' r='2'/%3E%3C/g%3E%3C/svg%3E");
  --wc-back: linear-gradient(165deg, #fff0dc 0%, #ffe3ec 50%, #fff5d1 100%); }
@media (min-width: 720px) { .wc { padding: 0 24px 28px; } }

/* the whole page gets a warm glow behind it */
body:has(.wc) { background-image: radial-gradient(1200px 520px at 50% -120px, rgba(225, 29, 72, .22), transparent 70%), radial-gradient(800px 400px at 100% 30%, rgba(249, 115, 22, .10), transparent 70%); }

/* the toran and the greeting at the top of the tool */
.wc-gate { margin: 0 -14px 10px; text-align: center; }
@media (min-width: 720px) { .wc-gate { margin: 0 -24px 14px; } }
.wc-gate-art { display: block; }
.wc-gate-t { margin: 2px 0 0; font-family: 'Rozha One', 'Yatra One', serif; font-size: clamp(30px, 6vw, 46px); line-height: 1.2; letter-spacing: .01em;
  background: linear-gradient(180deg, #fde68a, #eab308 55%, #b45309); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wc-gate-s { margin: 4px auto 0; max-width: 540px; padding: 0 14px; font-size: 15px; color: var(--text-2); }
.wc-gate-t::before, .wc-gate-t::after { content: '❁'; margin: 0 .35em; font-size: .55em; vertical-align: middle; }

/* the groups of the form: a gold edge and a marigold before each name */
.wc .bd-group { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--wc-gold) 80%, transparent); }
.wc .bd-group > summary { justify-content: flex-start; gap: 10px; }
.wc .bd-group > summary::before { content: ''; flex: none; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fde047 0 26%, #f97316 28% 58%, #f59e0b 60%); box-shadow: 0 0 0 2px color-mix(in srgb, #f97316 25%, transparent); }
.wc .bd-group > summary::after { margin-left: auto; }
.wc .bd-btn:not(.bd-go):not(.bd-pick):not(.bd-ghost) { border-color: color-mix(in srgb, var(--wc-gold) 55%, var(--border)); }
.wc .bd-go, .wc .bd-pick, .wc .bd-peek { box-shadow: 0 10px 26px -12px rgba(225, 29, 72, .85), inset 0 0 0 1px rgba(253, 230, 138, .35); }

/* the mandap round the card: the roof, a pillar on each side, the steps */
.wc-mandap { position: relative; }
.wc-canopy, .wc-base { display: block; width: 100%; height: auto; }
.wc-canopy { margin-bottom: -2px; }
.wc-base { margin-top: -2px; }
.wc-stage { display: grid; grid-template-columns: 14px minmax(0, 1fr) 14px; gap: 8px; padding: 0 1%; }
.wc-pillar { border-radius: 4px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5);
  background: repeating-linear-gradient(180deg, transparent 0 46px, #9f1239 46px 52px, transparent 52px 56px, #f97316 56px 59px, transparent 59px 72px),
              linear-gradient(90deg, #a16207, #fde68a 42%, #eab308 62%, #a16207); }
.wc .bd-paper { border-color: color-mix(in srgb, var(--wc-gold) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wc-gold) 25%, transparent), 0 24px 60px -24px rgba(0, 0, 0, .6); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .wc-gate-t { background-image: linear-gradient(180deg, #d97706, #be123c 70%); } }
:root[data-theme="light"] .wc-gate-t { background-image: linear-gradient(180deg, #d97706, #be123c 70%); }
@media (forced-colors: active) { .wc-gate-t { color: CanvasText; background: none; } }
/* on a small phone the frame gives the boxes back their room */
@media (max-width: 400px) {
  .wc { padding: 0 6px 14px; border-radius: 16px; }
  .wc-gate { margin: 0 -6px 8px; }
  .wc .bd-group > :not(summary) { margin-left: 10px; margin-right: 10px; }
  .wc-stage { grid-template-columns: 10px minmax(0, 1fr) 10px; gap: 6px; }
}
