/* ── Loveroom Bon Cadeau — Builder page styles ── */

.lbc-builder-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0 40px;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: #f2f2f2;
}

/* ── Two-column layout ── */
.lbc-builder-columns {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.lbc-builder-col-form {
  flex: 1;
  min-width: 0;
  max-width: 560px;
}
.lbc-builder-col-preview {
  width: 440px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}

/* ── Preview label ── */
.lbc-preview-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888888;
  text-align: center;
  margin: 0 0 10px;
}

/* ── Preview outer container (maintains A5 landscape ratio) ── */
.lbc-preview-outer {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* ── Preview card (fixed 500×352 internal, scaled by JS) ── */
.lbc-preview-card {
  width: 500px;
  height: 352px;
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 0;
  background: var(--lbc-p-bg, #2c1810);
  color: var(--lbc-p-text, #f5e6d3);
  font-family: 'Playfair Display', Georgia, serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.lbc-preview-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 6px;
  flex-shrink: 0;
}
.lbc-preview-badge {
  border: 1px solid var(--lbc-p-accent, #d4a96a);
  color: var(--lbc-p-accent, #d4a96a);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 1.5px;
  font-weight: bold;
}
.lbc-preview-site-url {
  color: var(--lbc-p-text, #f5e6d3);
  font-size: 8px;
  opacity: 0.75;
}
.lbc-preview-photo-area {
  text-align: center;
  margin: 4px 0;
  flex-shrink: 0;
}
.lbc-preview-photo-area img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--lbc-p-accent, #d4a96a);
  object-fit: cover;
}
.lbc-preview-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  text-align: center;
  min-height: 0;
}
.lbc-preview-type {
  font-size: 21px;
  font-weight: bold;
  color: var(--lbc-p-accent, #d4a96a);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 4px;
}
.lbc-preview-recipient {
  font-size: 11px;
  color: var(--lbc-p-text, #f5e6d3);
  margin: 2px 0;
}
.lbc-preview-message {
  font-size: 8.5px;
  color: var(--lbc-p-text, #f5e6d3);
  opacity: 0.8;
  max-height: 28px;
  overflow: hidden;
  margin: 2px 0;
  line-height: 1.4;
}
.lbc-preview-code-area {
  text-align: center;
  padding: 6px 24px;
  flex-shrink: 0;
}
.lbc-preview-code-box {
  display: inline-block;
  border: 1.5px solid var(--lbc-p-accent, #d4a96a);
  border-radius: 4px;
  padding: 5px 16px;
}
.lbc-preview-code {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: bold;
  color: var(--lbc-p-accent, #d4a96a);
  letter-spacing: 3px;
}
.lbc-preview-validity {
  font-size: 8px;
  color: var(--lbc-p-text, #f5e6d3);
  opacity: 0.65;
  margin-top: 4px;
}
.lbc-preview-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 16px 12px;
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.lbc-preview-instructions {
  font-size: 6.5px;
  color: var(--lbc-p-text, #f5e6d3);
  line-height: 1.7;
  flex: 1;
  margin-right: 12px;
}
.lbc-preview-instructions strong {
  color: var(--lbc-p-accent, #d4a96a);
  display: block;
  margin-bottom: 2px;
  font-size: 7px;
}
.lbc-preview-qr {
  color: var(--lbc-p-accent, #d4a96a);
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.lbc-preview-qr svg {
  width: 100%;
  height: 100%;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .lbc-builder-columns {
    flex-direction: column;
  }
  .lbc-builder-col-preview {
    width: 100%;
    position: static;
    order: -1;
  }
  .lbc-builder-col-form {
    max-width: 100%;
  }
}

.lbc-builder-title {
  font-size: 26px;
  text-align: center;
  margin-bottom: 24px;
  color: #cfae70;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lbc-error {
  background: rgba(214, 54, 56, 0.12);
  border-left: 4px solid #d63638;
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  color: #f08080;
}

/* ── Voucher summary banner ── */
.lbc-voucher-summary {
  background: #000000;
  border: 1px solid #cfae70;
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lbc-voucher-summary-type {
  color: #cfae70;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lbc-voucher-summary-code {
  font-size: 24px;
  font-weight: bold;
  color: #000000;
  background: #cfae70;
  letter-spacing: 3px;
  font-family: 'Courier New', monospace;
  padding: 6px 18px;
  border-radius: 4px;
}

.lbc-voucher-summary-validity {
  color: #888888;
  font-size: 13px;
}

/* ── Form fields ── */
.lbc-builder-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lbc-field label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 15px;
  color: #f2f2f2;
}

.lbc-field input[type="text"],
.lbc-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #333333;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #111111;
  color: #f2f2f2;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.lbc-field input[type="text"]:focus,
.lbc-field textarea:focus {
  outline: none;
  border-color: #cfae70;
}

.lbc-field input[type="text"]::placeholder,
.lbc-field textarea::placeholder {
  color: #555555;
}

.lbc-field textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── Photo upload ── */
.lbc-photo-area {
  position: relative;
}

.lbc-photo-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 2px dashed #cfae70;
  border-radius: 8px;
  cursor: pointer;
  background: #111111;
  transition: background 0.2s, border-color 0.2s;
  font-weight: normal !important;
}

.lbc-photo-label:hover {
  background: #1a1a1a;
}

.lbc-photo-icon { font-size: 22px; }
.lbc-photo-text { font-size: 14px; color: #aaaaaa; }

.lbc-photo-preview {
  position: relative;
  display: inline-block;
  margin-top: 12px;
}

.lbc-photo-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #cfae70;
}

.lbc-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d63638;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Templates ── */
.lbc-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lbc-template-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: normal !important;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lbc-template-option.is-selected {
  opacity: 1;
}

.lbc-template-radio {
  display: none;
}

.lbc-template-swatch {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  transition: transform 0.2s, border-color 0.2s;
}

.lbc-template-option.is-selected .lbc-template-swatch {
  transform: scale(1.1);
  border-color: #cfae70 !important;
}

.lbc-template-name {
  font-size: 12px;
  color: #aaaaaa;
}

/* ── Buttons ── */
.lbc-btn-generate {
  display: inline-block;
  background: #cfae70;
  color: #000000;
  border: 2px solid #cfae70;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.lbc-btn-generate:hover {
  background: transparent;
  color: #cfae70;
}

.lbc-btn-generate:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Status messages ── */
.lbc-status {
  margin: 8px 0 0;
  font-size: 14px;
}

.lbc-status.is-error   { color: #f08080; }
.lbc-status.is-success { color: #cfae70; }
.lbc-status.is-loading { color: #888888; }

/* ── Download area ── */
.lbc-download-area {
  background: #111111;
  border: 2px solid #cfae70;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  margin-top: 28px;
}

.lbc-download-area p {
  font-size: 16px;
  font-weight: bold;
  color: #cfae70;
  margin-bottom: 14px;
}

.lbc-btn-download {
  display: inline-block;
  background: #cfae70;
  color: #000000;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border 0.2s;
  border: 2px solid #cfae70;
}

.lbc-btn-download:hover {
  background: transparent;
  color: #cfae70;
}

.lbc-download-note {
  margin-top: 12px;
  font-size: 13px;
  color: #888888;
  font-weight: normal !important;
}

.lbc-submit-area {
  text-align: center;
}
