/* XESTUS Marriage Biodata Maker Stylesheet */
:root {
  --primary: #991b1b;
  --primary-gold: #b45309;
  --bg-sand: #fefcf6;
  --card-bg: #ffffff;
  --text-dark: #1f2937;
  --border-gold: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hind Siliguri', 'Inter', -apple-system, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: #ffffff;
  border-bottom: 2px solid #fed7aa;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #7f1d1d;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #b91c1c, #d97706);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-text span {
  font-size: 0.75rem;
  color: #b45309;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-maroon {
  background: #991b1b;
  color: white;
}

.btn-maroon:hover {
  background: #7f1d1d;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3);
}

.btn-gold {
  background: #d97706;
  color: white;
}

.btn-gold:hover {
  background: #b45309;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-outline {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-outline:hover {
  background: #f1f5f9;
}

/* App Main Layout */
.app-container {
  display: grid;
  grid-template-columns: 460px 1fr;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 65px);
}

@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
}

/* Editor Panel */
.editor-panel {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-card {
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffdfa;
  overflow: hidden;
}

.section-card-header {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #9a3412;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.form-group input, .form-group select, .form-group textarea {
  padding: 0.45rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

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

/* Preview Canvas */
.preview-panel {
  background: #f1f5f9;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preview-toolbar {
  background: white;
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #475569;
}

/* A4 Sheet */
.biodata-paper {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  position: relative;
  box-sizing: border-box;
  padding: 18mm 16mm;
  display: flex;
  flex-direction: column;
}

/* Theme 1: Traditional Royal (বাঙালী / ভারতীয় রাজকীয় ফ্রেম) */
.theme-royal {
  border: 8px double #991b1b;
  outline: 2px solid #d97706;
  outline-offset: -5px;
  background: #fffefb;
}

.theme-royal .biodata-header {
  text-align: center;
  border-bottom: 2px solid #b45309;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.theme-royal .blessing-symbol {
  font-size: 26px;
  color: #991b1b;
  margin-bottom: 2px;
}

.theme-royal .blessing-text {
  font-size: 15px;
  font-weight: 700;
  color: #991b1b;
  letter-spacing: 0.05em;
}

.theme-royal .main-title {
  font-size: 24px;
  font-weight: 800;
  color: #78350f;
  margin-top: 4px;
  text-transform: uppercase;
}

.theme-royal .biodata-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  font-size: 13.5px;
  line-height: 1.6;
}

.theme-royal .profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.theme-royal .biodata-photo {
  width: 110px;
  height: 130px;
  border: 3px solid #b45309;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.theme-royal .section-title {
  font-size: 15px;
  font-weight: 700;
  color: #991b1b;
  background: #fef3c7;
  padding: 4px 10px;
  border-left: 4px solid #b45309;
  border-radius: 0 4px 4px 0;
  margin-bottom: 8px;
}

.theme-royal .detail-table {
  width: 100%;
  border-collapse: collapse;
}

.theme-royal .detail-table td {
  padding: 4px 6px;
  vertical-align: top;
}

.theme-royal .detail-table td.label-col {
  width: 32%;
  font-weight: 600;
  color: #451a03;
}

.theme-royal .detail-table td.colon-col {
  width: 4%;
  text-align: center;
  font-weight: 700;
  color: #991b1b;
}

.theme-royal .detail-table td.value-col {
  width: 64%;
  color: #1f2937;
}

/* Theme 2: Floral Elegant */
.theme-floral {
  border: 5px solid #047857;
  outline: 1px solid #10b981;
  outline-offset: -3px;
  background: #ffffff;
}

.theme-floral .biodata-header {
  text-align: center;
  border-bottom: 2px solid #059669;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.theme-floral .blessing-text {
  font-size: 15px;
  font-weight: 700;
  color: #047857;
}

.theme-floral .main-title {
  font-size: 24px;
  font-weight: 800;
  color: #065f46;
}

.theme-floral .section-title {
  font-size: 15px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  padding: 4px 10px;
  border-left: 4px solid #059669;
  margin-bottom: 8px;
}

.theme-floral .detail-table td.label-col {
  width: 32%;
  font-weight: 600;
  color: #064e3b;
}

/* Ad Slot */
.ad-slot {
  max-width: 970px;
  margin: 1rem auto;
  text-align: center;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
}

/* Footer */
.app-footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-links a:hover {
  color: #f59e0b;
}

/* Print CSS */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body, html {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .app-header,
  .editor-panel,
  .preview-toolbar,
  .ad-slot,
  .app-footer {
    display: none !important;
  }

  .app-container {
    display: block !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .preview-panel {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .biodata-paper {
    width: 210mm !important;
    min-height: 297mm !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}
