/* ==========================================================================
   KAANTHAL PRINTERS - DEATH NOTICE & BANNER CREATOR STYLES
   ========================================================================== */

/* Import High Quality Tamil Web Fonts */
@import url('https://fonts.googleapis.com/css2?family=Arima+Madurai:wght@400;700;800&family=Catamaran:wght@400;600;700;800&family=Mukta+Malar:wght@400;600;700;800&family=Noto+Sans+Tamil:wght@400;500;600;700;800&family=Noto+Serif+Tamil:wght@400;600;700;800;900&family=Pavanam&display=swap');

/* Local Unicode Tamil Fonts from assets/Fonts */
@font-face {
  font-family: 'TAMIL-UNI001';
  src: url('../Fonts/TAMIL-UNI001.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TAMIL-UNI002';
  src: url('../Fonts/TAMIL-UNI002.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --nc-primary: #8a5a1f;
  --nc-primary-dark: #633e10;
  --nc-gold-light: #fbe8a6;
  --nc-gold-gradient: linear-gradient(135deg, #8a5a1f 0%, #d89f36 50%, #7a4610 100%);
  --nc-bg-dark: #12151b;
  --nc-bg-panel: #1b202a;
  --nc-border-color: #2e384d;
  --nc-text-muted: #94a3b8;
  --nc-accent: #e11d48;
}

/* Page Layout */
.nc-page-wrapper {
  background-color: #0b0e14;
  min-height: calc(100vh - 140px);
  padding: 1.5rem 0 3rem;
  color: #f1f5f9;
}

.nc-header-banner {
  background: linear-gradient(135deg, rgba(138, 90, 31, 0.25) 0%, rgba(18, 21, 27, 0.95) 100%);
  border-bottom: 1px solid rgba(216, 159, 54, 0.3);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}

.nc-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nc-header-title h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-header-title p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin: 0;
}

.nc-quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Main Workspace Grid */
.nc-workspace {
  display: grid;
  grid-template-columns: 490px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .nc-workspace {
    grid-template-columns: 1fr;
  }
}

/* Left Controls Panel */
.nc-controls-panel {
  background: #151a23;
  border: 1px solid #2a3447;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 90px);
  position: sticky;
  top: 80px;
}

.nc-tabs-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #0f131a;
  border-bottom: 2px solid #2a3447;
  overflow: hidden;
  padding: 0;
  min-height: 64px;
}

.nc-tab-btn {
  height: 100%;
  min-height: 64px;
  padding: 0.5rem 0.2rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  text-align: center;
  line-height: 1.2;
  box-sizing: border-box;
}

.nc-tab-btn * {
  pointer-events: none;
}

.nc-tab-btn i {
  font-size: 1.1rem;
}

.nc-tab-btn span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nc-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.nc-tab-btn.active {
  color: #fbbf24;
  border-bottom-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.nc-tab-content {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

/* Custom Scrollbar for tab content */
.nc-tab-content::-webkit-scrollbar {
  width: 6px;
}
.nc-tab-content::-webkit-scrollbar-track {
  background: #0f131a;
}
.nc-tab-content::-webkit-scrollbar-thumb {
  background: #2a3447;
  border-radius: 3px;
}
.nc-tab-content::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.nc-tab-pane {
  display: none;
}

.nc-tab-pane.active {
  display: block;
}

/* Form Styles */
.nc-form-group {
  margin-bottom: 1.1rem;
}

.nc-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.nc-form-group label small {
  font-weight: normal;
  color: #94a3b8;
}

.nc-form-control, .nc-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #0b0e14;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #f8fafc;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nc-form-control:focus, .nc-select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.nc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.nc-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

/* Custom Grid Selectors for Frames, Garlands, Fonts */
.nc-grid-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.nc-picker-card {
  background: #0d1117;
  border: 2px solid #273349;
  border-radius: 8px;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.nc-picker-card img, .nc-picker-card svg {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nc-picker-card span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

.nc-picker-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
}

.nc-picker-card.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Dynamic Relations List */
.nc-relations-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nc-relation-row {
  background: #0d1117;
  border: 1px solid #273349;
  border-radius: 8px;
  padding: 0.75rem;
  position: relative;
}

/* Smart Spouse Builder Box */
.nc-spouse-quick-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.5rem;
}

.nc-spouse-prefix, .nc-spouse-suffix {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
}

.nc-spouse-name-input {
  flex: 1;
  min-width: 130px;
  background: #0b0e14;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  font-size: 0.88rem;
  color: #ffffff;
  font-weight: 600;
}

.nc-spouse-name-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.nc-gender-pills {
  display: inline-flex;
  gap: 4px;
  background: #0b0e14;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid #273349;
}

.nc-pill-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nc-pill-btn:hover {
  color: #f8fafc;
}

.nc-pill-btn.active {
  background: #d97706;
  color: #ffffff;
  font-weight: bold;
}

.nc-relation-text {
  min-height: 54px;
  resize: vertical;
  line-height: 1.45;
  font-size: 0.88rem;
}

.nc-relation-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.nc-relation-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nc-relation-delete-btn {
  background: none;
  border: none;
  color: #f43f5e;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.nc-relation-delete-btn:hover {
  background: rgba(244, 63, 94, 0.15);
}

.nc-add-relation-btn {
  width: 100%;
  padding: 0.6rem;
  background: #1e293b;
  border: 1px dashed #475569;
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.nc-add-relation-btn:hover {
  background: #334155;
  color: #fff;
  border-color: #f59e0b;
}

/* Photo Uploader Dropzone */
.nc-dropzone {
  border: 2px dashed #3b4b66;
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  background: #0d1117;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.nc-dropzone:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.04);
}

.nc-dropzone i {
  font-size: 1.8rem;
  color: #fbbf24;
}

/* Right Live Preview Canvas Area */
.nc-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.nc-canvas-toolbar {
  width: 100%;
  background: #151a23;
  border: 1px solid #2a3447;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nc-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-tool-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.nc-tool-btn:hover {
  background: #334155;
  color: #fff;
}

.nc-btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #f59e0b;
  color: #fff;
}

.nc-btn-primary:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.nc-btn-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  border-color: #34d399;
  color: #fff;
}

.nc-btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Canvas Viewport */
.nc-canvas-viewport {
  width: 100%;
  overflow-x: auto;
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  background: #090c10;
  border-radius: 12px;
  border: 1px solid #1e2638;
}

/* ==========================================================================
   THE A4 NOTICE PRINTABLE SHEET (Exact 210mm x 297mm Layout)
   ========================================================================== */
.nc-notice-sheet {
  width: 794px; /* Standard A4 96DPI screen width */
  min-height: 1123px; /* Standard A4 96DPI screen height */
  height: 1123px;
  max-height: 1123px;
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  position: relative;
  box-sizing: border-box;
  padding: 52px 65px 68px 65px; /* Guaranteed tight margin clearance inside inner border */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden; /* STRICT SINGLE PAGE GUARANTEE */
  transform-origin: top center;
  transition: transform 0.2s ease;
}

/* Fonts */
.nc-notice-sheet.font-tamil-uni001 {
  font-family: 'TAMIL-UNI001', 'Noto Serif Tamil', serif;
}
.nc-notice-sheet.font-tamil-uni002 {
  font-family: 'TAMIL-UNI002', 'Noto Serif Tamil', serif;
}
.nc-notice-sheet.font-noto-serif {
  font-family: 'Noto Serif Tamil', serif;
}
.nc-notice-sheet.font-mukta {
  font-family: 'Mukta Malar', sans-serif;
}
.nc-notice-sheet.font-pavanam {
  font-family: 'Pavanam', sans-serif;
}
.nc-notice-sheet.font-arima {
  font-family: 'Arima Madurai', cursive;
}
.nc-notice-sheet.font-catamaran {
  font-family: 'Catamaran', sans-serif;
}

/* Outer Border & Corner Frames (Exact 14mm Margin) */
.nc-sheet-border-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
}

.nc-sheet-border {
  position: absolute;
  top: 53px; /* Exact 14mm at 96 DPI */
  left: 53px;
  right: 53px;
  bottom: 53px;
  border: 2px solid #8a5a1f;
  pointer-events: none;
  z-index: 2;
}

.nc-sheet-inner-border {
  position: absolute;
  top: 57px; /* 15mm */
  left: 57px;
  right: 57px;
  bottom: 57px;
  border: 1px solid #c9933b;
  pointer-events: none;
  z-index: 2;
}

/* Repeating Pattern Edges */
.nc-pattern-edge {
  display: none;
  position: absolute;
  pointer-events: none;
  z-index: 2;
  background-repeat: repeat;
}

/* 1. Plain Double Line (Default) */
.border-plain-double .nc-sheet-border { border: 2px solid #8a5a1f; display: block; }
.border-plain-double .nc-sheet-inner-border { border: 1px solid #c9933b; display: block; }

/* 2. Plain Single Thick Line */
.border-plain-single .nc-sheet-border { border: 3px solid #8a5a1f; display: block; }
.border-plain-single .nc-sheet-inner-border { display: none; }

/* 3. Plain Thin Line */
.border-plain-thin .nc-sheet-border { border: 1px solid #8a5a1f; display: block; }
.border-plain-thin .nc-sheet-inner-border { display: none; }

/* 4. Pattern: Floral Lace */
.border-pattern-floral .nc-sheet-border { border: 1px solid #8a5a1f; top: 49px; left: 49px; right: 49px; bottom: 49px; }
.border-pattern-floral .nc-sheet-inner-border { border: 1px solid #c9933b; top: 61px; left: 61px; right: 61px; bottom: 61px; }
.border-pattern-floral .nc-edge-top { display: block; top: 50px; left: 110px; right: 110px; height: 11px; background-image: url('../images/notice/patterns/pattern-floral-lace.svg'); background-size: auto 11px; }
.border-pattern-floral .nc-edge-bottom { display: block; bottom: 50px; left: 110px; right: 110px; height: 11px; background-image: url('../images/notice/patterns/pattern-floral-lace.svg'); background-size: auto 11px; transform: scaleY(-1); }
.border-pattern-floral .nc-edge-left { display: block; top: 110px; bottom: 110px; left: 50px; width: 11px; background-image: url('../images/notice/patterns/pattern-floral-lace.svg'); background-size: auto 11px; transform: rotate(90deg); transform-origin: top left; }
.border-pattern-floral .nc-edge-right { display: block; top: 110px; bottom: 110px; right: 50px; width: 11px; background-image: url('../images/notice/patterns/pattern-floral-lace.svg'); background-size: auto 11px; transform: rotate(90deg); transform-origin: top right; }

/* 5. Pattern: Chain Rope */
.border-pattern-chain .nc-sheet-border { border: 1px solid #8a5a1f; top: 50px; left: 50px; right: 50px; bottom: 50px; }
.border-pattern-chain .nc-sheet-inner-border { border: 1px solid #c9933b; top: 60px; left: 60px; right: 60px; bottom: 60px; }
.border-pattern-chain .nc-edge-top { display: block; top: 51px; left: 110px; right: 110px; height: 9px; background-image: url('../images/notice/patterns/pattern-chain-rope.svg'); background-size: auto 9px; }
.border-pattern-chain .nc-edge-bottom { display: block; bottom: 51px; left: 110px; right: 110px; height: 9px; background-image: url('../images/notice/patterns/pattern-chain-rope.svg'); background-size: auto 9px; }
.border-pattern-chain .nc-edge-left { display: block; top: 110px; bottom: 110px; left: 51px; width: 9px; background-image: url('../images/notice/patterns/pattern-chain-rope.svg'); background-size: auto 9px; transform: rotate(90deg); transform-origin: top left; }
.border-pattern-chain .nc-edge-right { display: block; top: 110px; bottom: 110px; right: 51px; width: 9px; background-image: url('../images/notice/patterns/pattern-chain-rope.svg'); background-size: auto 9px; transform: rotate(90deg); transform-origin: top right; }

/* 6. Pattern: Temple Beads */
.border-pattern-beads .nc-sheet-border { border: 1px solid #8a5a1f; top: 51px; left: 51px; right: 51px; bottom: 51px; }
.border-pattern-beads .nc-sheet-inner-border { border: 1px solid #c9933b; top: 59px; left: 59px; right: 59px; bottom: 59px; }
.border-pattern-beads .nc-edge-top { display: block; top: 52px; left: 110px; right: 110px; height: 7px; background-image: url('../images/notice/patterns/pattern-temple-beads.svg'); background-size: auto 7px; }
.border-pattern-beads .nc-edge-bottom { display: block; bottom: 52px; left: 110px; right: 110px; height: 7px; background-image: url('../images/notice/patterns/pattern-temple-beads.svg'); background-size: auto 7px; }
.border-pattern-beads .nc-edge-left { display: block; top: 110px; bottom: 110px; left: 52px; width: 7px; background-image: url('../images/notice/patterns/pattern-temple-beads.svg'); background-size: auto 7px; transform: rotate(90deg); transform-origin: top left; }
.border-pattern-beads .nc-edge-right { display: block; top: 110px; bottom: 110px; right: 52px; width: 7px; background-image: url('../images/notice/patterns/pattern-temple-beads.svg'); background-size: auto 7px; transform: rotate(90deg); transform-origin: top right; }

/* 7. No Border */
.border-none .nc-sheet-border { display: none; }
.border-none .nc-sheet-inner-border { display: none; }

/* Black & White (B&W) Border Line Overrides */
.nc-sheet-border-wrap.border-bw-mode .nc-sheet-border {
  border-color: #000000 !important;
}
.nc-sheet-border-wrap.border-bw-mode .nc-sheet-inner-border {
  border-color: #000000 !important;
}
.nc-sheet-border-wrap.border-bw-mode .nc-pattern-edge {
  filter: grayscale(100%) brightness(0) contrast(200%) !important;
}

.nc-bw-toggle-box {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.nc-bw-toggle-box:hover {
  border-color: #64748b !important;
  transform: translateY(-1px);
}
.nc-bw-toggle-box.active {
  border-color: #fbbf24 !important;
  background: #1e293b !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}


/* 4 Ornate Corners aligned to 14mm border */
.nc-corner-ornament {
  position: absolute;
  width: 75px;
  height: 75px;
  pointer-events: none;
  z-index: 3;
  background-size: contain;
  background-repeat: no-repeat;
}

.nc-corner-tl {
  top: 49px;
  left: 49px;
}
.nc-corner-tr {
  top: 49px;
  right: 49px;
  transform: scaleX(-1);
}
.nc-corner-bl {
  bottom: 49px;
  left: 49px;
  transform: scaleY(-1);
}
.nc-corner-br {
  bottom: 49px;
  right: 49px;
  transform: scale(-1, -1);
}

/* Notice Header */
.nc-sheet-header {
  text-align: center;
  position: relative;
  z-index: 4;
  margin-top: 4px;
  margin-bottom: 10px;
}

.nc-sheet-title {
  font-family: 'TAMIL-UNI001', 'Noto Serif Tamil', serif;
  font-size: 32px;
  font-weight: normal;
  color: #111827;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.2;
}

.nc-sheet-title-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}

.nc-title-line {
  height: 2px;
  width: 80px;
  background: linear-gradient(90deg, transparent, #8a5a1f, transparent);
}

/* Upper Hero Layout (Date | Vilakku | Photo | Vilakku | Date) */
.nc-sheet-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: relative;
  z-index: 4;
  padding: 0 28px; /* Moved inwards away from the borders */
}

.nc-hero-col-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 80px;
}

.nc-date-header-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 9px;
}

.nc-date-accent-top, .nc-date-accent-bot {
  width: 50px;
  height: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8'%3E%3Cline x1='0' y1='4' x2='24' y2='4' stroke='%23333333' stroke-width='1.2'/%3E%3Ccircle cx='30' cy='4' r='2.5' fill='%23333333'/%3E%3Cline x1='36' y1='4' x2='60' y2='4' stroke='%23333333' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.nc-date-label {
  font-size: 20px;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.5px;
  margin: 2px 0;
  display: block;
}

.nc-date-digits {
  font-size: 20px;
  font-weight: 900;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px; /* Increased line spacing between date numbers */
}

.nc-date-sep {
  width: 5px;
  height: 5px;
  background: #1a1a1a;
  border-radius: 50%;
  margin: 2px 0;
  display: block;
}

/* Side Vilakku Lamps */
.nc-hero-col-lamp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 120px;
}

.nc-hero-col-lamp img, .nc-hero-col-lamp svg {
  width: 88px;
  height: auto;
  max-height: 118px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.lamp-picker-card img {
  background: #ffffff;
  padding: 3px 6px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Central Photo & Garland Frame */
.nc-hero-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.nc-photo-frame-wrap {
  position: relative;
  width: 170px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nc-photo-oval-border {
  width: 155px;
  height: 190px;
  border-radius: 50%;
  border: 3px solid #d4a34b;
  box-shadow: 0 0 0 1px #7a4b12, 0 4px 10px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  background: #f8fafc;
  cursor: grab;
  user-select: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

/* When an ornamental frame is active, hide the inner CSS border completely */
.nc-photo-frame-wrap.has-custom-frame .nc-photo-oval-border {
  border: none !important;
  box-shadow: none !important;
}

.nc-photo-oval-border:active {
  cursor: grabbing;
}

.nc-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
  pointer-events: none;
}

.nc-photo-frame-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 175px;
  height: 220px;
}

.nc-photo-frame-overlay img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* Precision Calibrated Frame Proportions */
/* Image 1: Floral Frame - Reduced Height */
.nc-photo-frame-wrap[data-frame-name="Frame-1"] .nc-photo-frame-overlay {
  width: 178px;
  height: 188px;
}

/* Image 2: Carved Wooden Gold Frame - Reduced Width */
.nc-photo-frame-wrap[data-frame-name="Frame-2"] .nc-photo-frame-overlay {
  width: 166px;
  height: 226px;
}

/* Image 3: Royal Baroque Gold Frame - Reduced Width */
.nc-photo-frame-wrap[data-frame-name="Frame-3"] .nc-photo-frame-overlay {
  width: 168px;
  height: 226px;
}

/* Image 4: Golden Lotus Petal Frame - Reduced Width */
.nc-photo-frame-wrap[data-frame-name="Frame-4"] .nc-photo-frame-overlay {
  width: 162px;
  height: 232px;
}

/* Classic Beveled Gold Frame */
.nc-photo-frame-wrap[data-frame-name="banner-oval-gold"] .nc-photo-frame-overlay {
  width: 170px;
  height: 216px;
}

.frame-picker-card img {
  background: #ffffff;
  padding: 3px 6px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  max-height: 48px;
  object-fit: contain;
}

.nc-garland-overlay {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  pointer-events: none;
  z-index: 5;
}

.nc-garland-overlay img, .nc-garland-overlay svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Primary Identity Box (Birthplace, Residence, Name, Passing Statement) */
.nc-identity-box {
  border: 1.5px solid #222;
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 4;
  background: rgba(254, 252, 246, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nc-identity-places {
  font-size: 13.5px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
  line-height: 1.35;
  white-space: nowrap;
}

.nc-deceased-name {
  font-size: 21px;
  font-weight: 900;
  color: #09090b;
  margin-bottom: 4px;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.nc-deceased-titles {
  font-size: 11.5px;
  font-weight: 500;
  color: #333;
  line-height: 1.35;
  margin-bottom: 4px;
}

.nc-passing-statement {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

/* Relational & Family Hierarchy Body */
.nc-relations-body {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  padding: 2px 6px;
  margin-top: 4px;
  margin-bottom: 6px;
}

.nc-relation-item {
  font-size: inherit;
  line-height: inherit;
  color: #1e293b;
  text-align: center;
  margin-bottom: 0;
}

.nc-relation-item strong {
  color: #000;
  font-weight: 800;
}

.nc-relation-item span {
  font-weight: 400 !important;
}

/* Fixed Bottom Section (Always docked directly before bottom border) */
.nc-bottom-dock {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
  margin-top: 8px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Footer & Informer Details (தகவல்) */
.nc-sheet-footer {
  position: relative;
  z-index: 4;
  margin-top: 2px;
  margin-bottom: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nc-informer-table {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.nc-informer-label {
  white-space: nowrap;
  font-weight: 800;
  color: #000000;
}

.nc-informer-text {
  color: #1e293b;
  font-weight: 600;
}

.nc-informer-sep {
  color: #8a5a1f;
  font-weight: 700;
  padding: 0 2px;
}

.nc-informer-date {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

/* Funeral / Cremation Highlight Box (Permanently fixed directly before bottom border) */
.nc-funeral-box {
  border: 1.5px solid #8a5a1f;
  outline: 2px dashed #b88328;
  outline-offset: 2px;
  border-radius: 4px;
  padding: 10px 16px;
  text-align: center;
  margin-top: 4px;
  margin-bottom: 5px;
  position: relative;
  z-index: 4;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.nc-funeral-text {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: #111827;
  letter-spacing: 0.2px;
}

.nc-funeral-text.font-noto-sans {
  font-family: 'Noto Sans Tamil', sans-serif;
}

.nc-funeral-text.font-mukta {
  font-family: 'Mukta Malar', sans-serif;
}

.nc-funeral-text.font-arima {
  font-family: 'Arima Madurai', cursive;
}

.nc-funeral-text.font-pavanam {
  font-family: 'Pavanam', sans-serif;
}

.nc-funeral-text.font-noto-serif {
  font-family: 'Noto Serif Tamil', serif;
}

/* Outer Bottom Printer Brand Credit (Outside the frame at bottom left) */
.nc-printer-brand-credit {
  position: absolute;
  bottom: 30px;
  left: 55px;
  font-size: 11px;
  color: #475569;
  letter-spacing: 0.5px;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-weight: 500;
  z-index: 5;
}

/* ==========================================================================
   THEMES & STYLING VARIATIONS
   ========================================================================== */

/* 1. Classic Gold & Brown (Default) */
.theme-gold-floral .nc-sheet-border { border-color: #8a5a1f; }
.theme-gold-floral .nc-sheet-inner-border { border-color: #c9933b; }
.theme-gold-floral .nc-identity-box { border-color: #8a5a1f; background: #fffcf7; }
.theme-gold-floral .nc-funeral-box { border: 2px solid #8a5a1f; background: #fffcf7; }

/* 2. Vintage Filigree */
.theme-vintage-filigree .nc-sheet-border { border-color: #5c3809; border-width: 3px; }
.theme-vintage-filigree .nc-sheet-inner-border { border-color: #b3822d; border-style: double; border-width: 3px; }
.theme-vintage-filigree .nc-identity-box { border-color: #5c3809; }

/* 3. Temple Arch */
.theme-temple-arch .nc-sheet-border { border-color: #7a440c; }
.theme-temple-arch .nc-sheet-inner-border { border-color: #dca538; }

/* 4. Minimalist Black & White (Cost-effective Offset/Photocopy) */
.theme-minimal-black .nc-sheet-border { border-color: #000000; border-width: 2px; }
.theme-minimal-black .nc-sheet-inner-border { border-color: #000000; border-width: 1px; }
.theme-minimal-black .nc-photo-oval-border { border-color: #000000; box-shadow: none; }
.theme-minimal-black .nc-identity-box { border-color: #000000; background: #ffffff; }
.theme-minimal-black .nc-funeral-box { border: 2px solid #000000; background: #ffffff; }

/* ==========================================================================
   PRINT SPECIFIC CALIBRATION (@media print)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .site-header, .site-footer, .nc-header-banner, .nc-controls-panel, .nc-canvas-toolbar, .nc-zoom-controls, .lang-switch {
    display: none !important;
  }

  .nc-page-wrapper {
    background: transparent !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .nc-workspace {
    display: block !important;
  }

  .nc-canvas-viewport {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
  }

  .nc-notice-sheet {
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    padding: 18mm 17mm 16mm 17mm !important;
  }

  .nc-sheet-border {
    top: 14mm !important;
    left: 14mm !important;
    right: 14mm !important;
    bottom: 14mm !important;
  }

  .nc-sheet-inner-border {
    top: 15.5mm !important;
    left: 15.5mm !important;
    right: 15.5mm !important;
    bottom: 15.5mm !important;
  }

  .nc-corner-tl { top: 13mm !important; left: 13mm !important; }
  .nc-corner-tr { top: 13mm !important; right: 13mm !important; }
  .nc-corner-bl { bottom: 13mm !important; left: 13mm !important; }
  .nc-corner-br { bottom: 13mm !important; right: 13mm !important; }
}
