/* Biodata Maker Plugin Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

#biodata-app {
  font-family: 'Lato', sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  color: #333;
}

/* Steps */
.biodata-step { display: none; }
.biodata-step.active { display: block; }

/* Header */
.biodata-header {
  text-align: center;
  margin-bottom: 30px;
}
.biodata-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: #8B0000;
  margin: 0 0 8px;
}
.biodata-header p {
  color: #888;
  font-size: 15px;
  margin: 0;
}

/* Form */
.biodata-section {
  background: #fff;
  border: 1px solid #e8dcc8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.biodata-section h3 {
  font-family: 'Playfair Display', serif;
  color: #8B0000;
  font-size: 18px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0e0c0;
}
.biodata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.field-group { display: flex; flex-direction: column; }
.field-group.full { grid-column: 1/-1; }
.field-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 5px;
}
.field-group input,
.field-group select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: 'Lato', sans-serif;
  color: #333;
  background: #fafafa;
  transition: border 0.2s;
  outline: none;
}
.field-group input:focus,
.field-group select:focus {
  border-color: #c8a84b;
  background: #fff;
}

/* Photo */
.photo-upload-area {
  display: inline-block;
}
#photo-placeholder {
  width: 150px;
  height: 150px;
  border: 2px dashed #c8a84b;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #aaa;
  transition: all 0.2s;
}
#photo-placeholder:hover { background: #fffbf0; }
#photo-placeholder span { font-size: 30px; }
#photo-placeholder p { margin: 6px 0 0; font-size: 13px; }
#remove-photo {
  display: block;
  margin-top: 8px;
  background: #fee;
  border: 1px solid #fcc;
  color: #c00;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #8B0000, #c8a84b);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-back {
  background: #f5f5f5;
  color: #555;
  border: 1px solid #ddd;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
}
.btn-back:hover { background: #eee; }
.biodata-actions { text-align: center; margin-top: 20px; }

/* Design Grid */
.designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.design-card {
  border: 2px solid #e8dcc8;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  background: #fff;
}
.design-card:hover { border-color: #c8a84b; box-shadow: 0 4px 16px rgba(200,168,75,0.2); transform: translateY(-2px); }
.design-card.selected { border-color: #8B0000; box-shadow: 0 4px 16px rgba(139,0,0,0.2); }

/* Mini biodata thumbnail */
.design-thumb {
  border: 3px solid;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 10px;
  min-height: 180px;
  font-size: 9px;
  text-align: center;
}
.mini-ganesh { font-size: 18px; margin-bottom: 2px; }
.mini-title { font-size: 7px; font-weight: bold; margin-bottom: 4px; }
.mini-section {
  color: #fff;
  font-size: 7px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 2px;
  margin: 4px 0 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mini-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 2px;
  text-align: left;
  font-size: 7px;
  margin: 1.5px 0;
  color: #333;
}
.design-label {
  font-weight: 700;
  font-size: 13px;
  color: #333;
  margin-bottom: 8px;
}
.btn-select {
  background: #8B0000;
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
}

.step-nav {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

/* Preview */
.preview-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.preview-actions.bottom { margin-top: 24px; }

#biodata-preview-container {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  background: #f0ece4;
  border-radius: 12px;
}

/* The actual biodata card rendered for preview/PDF */
#biodata-preview-card {
  width: 595px;
  min-height: 842px;
  background: #fff;
  padding: 30px 28px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  font-size: 11px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.bd-card-inner {
  border: 8px double;
  padding: 20px;
  min-height: 780px;
  position: relative;
}

.bd-title-block {
  text-align: center;
  margin-bottom: 12px;
}
.bd-ganesh-icon { font-size: 28px; display: block; }
.bd-shri-text {
  font-size: 11px;
  font-weight: bold;
  margin: 2px 0 8px;
}
.bd-photo-wrap {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: 90px;
  border: 2px solid;
  border-radius: 4px;
  overflow: hidden;
  background: #f9f9f9;
}
.bd-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bd-section-head {
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  text-align: center;
  padding: 4px 8px;
  letter-spacing: 1px;
  margin: 10px 0 6px;
  border-radius: 2px;
}
.bd-table {
  width: 100%;
  border-collapse: collapse;
}
.bd-table td {
  padding: 2px 4px;
  vertical-align: top;
  line-height: 1.5;
}
.bd-table .td-label { width: 130px; font-weight: 500; color: #444; }
.bd-table .td-colon { width: 16px; text-align: center; color: #888; }
.bd-table .td-value { color: #222; }

/* Responsive */
@media (max-width: 640px) {
  .designs-grid { grid-template-columns: 1fr 1fr; }
  .biodata-grid { grid-template-columns: 1fr; }
  #biodata-preview-card { width: 100%; min-height: auto; font-size: 9px; }
  #biodata-preview-card { transform: scale(0.85); transform-origin: top left; }
}
