/* Marriage biodata maker: /marriage-biodata-maker. The sheet is an A4 page
   at 96 dpi (794 x 1123 px); the preview scales it down to fit. */

.bd-fieldset {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 12px 14px 8px;
    margin-bottom: 14px;
}
.bd-fieldset legend {
    float: none;
    width: auto;
    font-size: 1rem;
    font-weight: 600;
    padding: 0 6px;
    margin-bottom: 4px;
}
.bd-fieldset .form-label { font-size: .85rem; margin-bottom: 2px; color: #555; }
.bd-extra-row { margin-top: 8px; }
#bd-photo-thumb { width: 42px; height: 56px; object-fit: cover; border-radius: 4px; }

@media (min-width: 992px) {
    .bd-preview-col { position: sticky; top: 10px; }
}
/* Phones: the preview is below the form, so a button jumps to it. */
.bd-jump {
    position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
    z-index: 1000; border-radius: 24px; box-shadow: 0 3px 12px rgba(0,0,0,.25);
    white-space: nowrap;
}
.bd-templates { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bd-template-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid #ccc; background: #fff; border-radius: 20px;
    padding: 4px 12px 4px 6px; font-size: .85rem; cursor: pointer;
}
.bd-template-btn.active { border-color: #0d6efd; box-shadow: 0 0 0 2px rgba(13,110,253,.25); font-weight: 600; }
.bd-swatch { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 2px solid var(--bd-accent); background: var(--bd-paper); }

.bd-preview-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    background: #fff;
}
.bd-preview-wrap .bd-sheet { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.bd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.bd-next { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #fff8e6; border: 1px solid #f3d27a; }
.bd-guide { margin-top: 36px; max-width: 760px; }
.bd-guide h2 { font-size: 1.35rem; margin-top: 28px; }
.bd-guide h3 { font-size: 1.1rem; margin-top: 18px; }
.bd-join { margin-top: 30px; padding: 18px; border-radius: 8px; background: #f3f7ff; }
.bd-join h2 { margin-top: 0; }

/* ---- The sheet ---- */

.bd-sheet {
    --bd-accent: #8b1a1a;
    --bd-accent-2: #c9962b;
    --bd-paper: #fffaf0;
    --bd-ink: #2b2118;
    --bd-label: #6b4f3a;
    width: 794px;
    min-height: 1123px;
    padding: 26px;
    background: var(--bd-paper);
    color: var(--bd-ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    line-height: 1.4;
    box-sizing: border-box;
}
.bd-frame {
    min-height: 1071px;
    padding: 5px;
    border: 3px solid var(--bd-accent);
    box-sizing: border-box;
    display: flex;
}
.bd-frame-inner {
    flex: 1;
    padding: 22px 34px 24px;
    border: 1px solid var(--bd-accent-2);
}
.bd-invocation {
    text-align: center;
    color: var(--bd-accent);
    font-size: 19px;
    font-weight: bold;
    font-family: 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', 'Noto Naskh Arabic', 'Noto Sans Gurmukhi', sans-serif;
    margin-bottom: 4px;
}
.bd-title {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--bd-accent-2);
    margin-bottom: 14px;
}
.bd-top { display: flex; gap: 26px; align-items: flex-start; }
.bd-top-main { flex: 1; min-width: 0; }
.bd-photo {
    width: 180px; height: 240px; object-fit: cover; flex: none;
    border: 2px solid var(--bd-accent-2);
    padding: 3px;
    background: var(--bd-paper);
    margin-top: 6px;
    box-sizing: content-box;
}
.bd-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--bd-accent);
    line-height: 1.2;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}
.bd-section { margin-top: 13px; }
.bd-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--bd-accent);
    border-bottom: 1.5px solid var(--bd-accent-2);
    padding-bottom: 3px;
    margin-bottom: 5px;
    letter-spacing: .5px;
}
.bd-row { display: flex; padding: .1em 0; }
.bd-label { width: 190px; flex: none; color: var(--bd-label); }
.bd-colon { width: 16px; flex: none; color: var(--bd-label); }
.bd-value { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.bd-text { white-space: pre-line; overflow-wrap: anywhere; }
.bd-empty { text-align: center; color: #9a8b7c; font-style: italic; margin-top: 60px; }

/* Marigold: saffron and turmeric. */
.tpl-marigold {
    --bd-accent: #c2410c;
    --bd-accent-2: #eab308;
    --bd-paper: #fffbea;
    --bd-ink: #3b2a12;
    --bd-label: #8a5a1c;
}
.bd-sheet.tpl-marigold .bd-frame { border: 7px solid var(--bd-accent-2); padding: 4px; }
.bd-sheet.tpl-marigold .bd-frame-inner { border: 2px solid var(--bd-accent); }

/* Neel: navy, modern, no double frame. */
.tpl-neel {
    --bd-accent: #1e3a8a;
    --bd-accent-2: #60a5fa;
    --bd-paper: #ffffff;
    --bd-ink: #1f2937;
    --bd-label: #4b5563;
}
.bd-sheet.tpl-neel { font-family: 'Segoe UI', Roboto, Arial, sans-serif; font-size: 15px; }
.bd-sheet.tpl-neel .bd-frame { border: none; border-top: 10px solid var(--bd-accent); padding: 0; }
.bd-sheet.tpl-neel .bd-frame-inner { border: none; padding-top: 30px; }
.bd-sheet.tpl-neel .bd-section-title { background: #eef2ff; border: none; border-left: 4px solid var(--bd-accent); padding: 4px 10px; }
.bd-sheet.tpl-neel .bd-photo { border-radius: 8px; border: 0; padding: 0; }

/* Mehendi: green and gold. */
.tpl-mehendi {
    --bd-accent: #166534;
    --bd-accent-2: #b8860b;
    --bd-paper: #f7fbf2;
    --bd-ink: #1c2a1c;
    --bd-label: #4d6b3c;
}
.bd-sheet.tpl-mehendi .bd-frame { border: 2px solid var(--bd-accent); border-radius: 14px; padding: 6px; }
.bd-sheet.tpl-mehendi .bd-frame-inner { border: 3px solid var(--bd-accent-2); border-radius: 9px; }

/* Simple: black on white, prints on any printer. */
.tpl-simple {
    --bd-accent: #111111;
    --bd-accent-2: #777777;
    --bd-paper: #ffffff;
    --bd-ink: #111111;
    --bd-label: #444444;
}
.bd-sheet.tpl-simple .bd-frame { border: 1px solid #111; padding: 0; }
.bd-sheet.tpl-simple .bd-frame-inner { border: none; }

.bd-template-btn.tpl-kumkum { --bd-accent: #8b1a1a; --bd-paper: #fffaf0; }
.bd-orn { color: var(--bd-accent-2); letter-spacing: 0; }
.bd-sheet.tpl-neel .bd-orn, .bd-sheet.tpl-simple .bd-orn { display: none; }
