/* ===========================================================
   MINHAAJ DESIGN FACTOR — POST GENERATOR
   =========================================================== */

/* App layout */
.mdf-app {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
  font-family: 'Montserrat', sans-serif;
  color: #1f1b16;
  max-width: 1600px;
}

/* ── CONTROLS ── */
.mdf-controls {
  flex: 0 0 360px;
  max-width: 360px;
  background: #fbf8f2;
  border: 1px solid #ece2cf;
  border-radius: 14px;
  padding: 26px 24px 28px;
  box-shadow: 0 10px 40px rgba(120,95,40,0.08);
}
.mdf-controls-head { margin-bottom: 22px; }
.mdf-controls-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #b9842a;
  margin-bottom: 8px;
}
.mdf-controls-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 600;
  margin: 0;
  color: #2b2118;
  line-height: 1.1;
}

.mdf-field { display: block; margin-bottom: 18px; }
.mdf-field-row { display: flex; gap: 14px; }
.mdf-field-row .mdf-field { flex: 1; }

.mdf-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e5a3c;
  margin-bottom: 7px;
}
.mdf-label small {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #a08b66;
}
.mdf-field input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddd0b6;
  border-radius: 8px;
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #2b2118;
  transition: border-color .2s, box-shadow .2s;
}
.mdf-field input[type="text"]:focus {
  outline: none;
  border-color: #D4A03C;
  box-shadow: 0 0 0 3px rgba(212,160,60,0.18);
}
.mdf-field input[type="file"] {
  width: 100%;
  font-size: 12px;
  padding: 9px 0;
  color: #4a3d28;
}
.mdf-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddd0b6;
  border-radius: 8px;
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #2b2118;
  cursor: pointer;
}
.mdf-field select:focus {
  outline: none;
  border-color: #D4A03C;
  box-shadow: 0 0 0 3px rgba(212,160,60,0.18);
}
.mdf-custom-bg {
  background: #f5efe1;
  border: 1px solid #e6d9bd;
  border-radius: 10px;
  padding: 14px 14px 2px;
  margin-bottom: 18px;
}
.mdf-range { margin-bottom: 14px; }
.mdf-range input[type="range"] {
  width: 100%;
  accent-color: #D4A03C;
  cursor: pointer;
}
.mdf-hint {
  display: block;
  font-size: 11px;
  color: #a08b66;
  margin-top: 5px;
  line-height: 1.4;
}
.mdf-hint code,
.mdf-label code {
  background: #f0e8d6;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  color: #8a6a26;
}

.mdf-download-btn {
  width: 100%;
  margin-top: 6px;
  padding: 14px 18px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #D4A03C, #b9842a);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform .15s, box-shadow .2s, opacity .2s;
  box-shadow: 0 6px 20px rgba(212,160,60,0.35);
}
.mdf-download-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(212,160,60,0.45); }
.mdf-download-btn:active { transform: translateY(0); }
.mdf-download-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.mdf-download-note {
  font-size: 12px;
  color: #8a7a5c;
  margin: 10px 0 0;
  min-height: 16px;
  text-align: center;
}

/* ── PREVIEW AREA (responsive scaler) ── */
.mdf-preview-area { flex: 1 1 480px; min-width: 320px; }
.mdf-preview-scaler {
  position: relative;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
/* Canvas is fixed 1080 and scaled to fit container — keeps export crisp */
#mdf-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 1080px;
  height: 1080px;
  transform-origin: top left;
}

/* ===========================================================
   ORIGINAL POST DESIGN (preserved)
   =========================================================== */
.post-wrapper { position: relative; overflow: hidden; background: #111; }

.bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transform: scale(1.04);
  background-color: #2a241c;
}

.overlay-top { position: absolute; top: 0; left: 0; right: 0; height: 220px;
  background: linear-gradient(180deg, rgba(10,8,6,0.82) 0%, rgba(10,8,6,0.0) 100%); }
.overlay-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 380px;
  background: linear-gradient(0deg, rgba(8,6,4,0.92) 0%, rgba(8,6,4,0.75) 40%, transparent 100%); }
.overlay-left { position: absolute; top: 0; left: 0; bottom: 0; width: 200px;
  background: linear-gradient(90deg, rgba(8,6,4,0.55) 0%, transparent 100%); }
.overlay-right { position: absolute; top: 0; right: 0; bottom: 0; width: 200px;
  background: linear-gradient(270deg, rgba(8,6,4,0.55) 0%, transparent 100%); }

.border-top { position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, transparent 0%, #D4A03C 25%, #f5c84a 50%, #D4A03C 75%, transparent 100%); }
.border-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, transparent 0%, #D4A03C 25%, #f5c84a 50%, #D4A03C 75%, transparent 100%); }
.border-left { position: absolute; top: 5px; left: 0; bottom: 5px; width: 5px;
  background: linear-gradient(180deg, transparent 0%, #D4A03C 25%, #f5c84a 50%, #D4A03C 75%, transparent 100%); }
.border-right { position: absolute; top: 5px; right: 0; bottom: 5px; width: 5px;
  background: linear-gradient(180deg, transparent 0%, #D4A03C 25%, #f5c84a 50%, #D4A03C 75%, transparent 100%); }

.inner-border { position: absolute; top: 20px; left: 20px; right: 20px; bottom: 20px;
  border: 1px solid rgba(212,160,60,0.22); pointer-events: none; }

.logo-wrap {
  position: absolute; top: 30px; left: 40px; width: 110px;
  filter: drop-shadow(0 0 16px rgba(212,160,60,0.5));
}
.logo-wrap img { width: 100%; display: block; }

.side-badge {
  position: absolute; right: 38px; top: 200px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.badge-line { width: 1px; height: 60px; background: linear-gradient(180deg, transparent, #D4A03C); }
.badge-text {
  writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
  font-family: 'Montserrat', sans-serif; font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.28em; color: rgba(212,160,60,0.65); text-transform: uppercase;
}
.badge-line-b { width: 1px; height: 60px; background: linear-gradient(180deg, #D4A03C, transparent); }

.text-block { position: absolute; bottom: 82px; left: 0; right: 0; padding: 0 60px; }

.label-small {
  font-family: 'Montserrat', sans-serif; font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: #D4A03C;
  margin-bottom: 10px; opacity: 0.9;
}
.headline {
  font-family: 'Cormorant Garamond', serif; font-size: 58px; font-weight: 300;
  color: #f5ead4; line-height: 1.08; margin-bottom: 14px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.7);
}
.headline em { font-style: italic; color: #D4A03C; }

.divider-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.div-line { flex: 1; max-width: 80px; height: 1px;
  background: linear-gradient(90deg, #D4A03C, rgba(212,160,60,0.1)); }
.div-line-r { background: linear-gradient(270deg, #D4A03C, rgba(212,160,60,0.1)); }
.div-diamond { width: 6px; height: 6px; background: #D4A03C; transform: rotate(45deg); flex-shrink: 0; }

.subtext {
  font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: rgba(220,195,145,0.75);
  margin-bottom: 0;
}

.website-row { display: flex; align-items: center; gap: 10px; }
.web-icon {
  width: 28px; height: 28px; border: 1px solid rgba(212,160,60,0.50);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.web-icon svg { width: 14px; height: 14px; fill: none; stroke: #D4A03C; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.web-url {
  font-family: 'Montserrat', sans-serif; font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.12em; color: rgba(212,160,60,0.85); text-transform: lowercase;
}

/* Bottom-right corner badge */
.corner-badge {
  position: absolute;
  bottom: 44px;
  left: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}
.corner-icon {
  width: 15px; height: 15px;
  fill: none; stroke: #D4A03C; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.corner-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(212,160,60,0.85);
  text-transform: lowercase;
}

/* Mobile */
@media (max-width: 860px) {
  .mdf-controls { flex: 1 1 100%; max-width: 100%; }
}

/* ── Select dropdown ── */
.mdf-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddd0b6;
  border-radius: 8px;
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #2b2118;
  cursor: pointer;
}
.mdf-field select:focus {
  outline: none;
  border-color: #D4A03C;
  box-shadow: 0 0 0 3px rgba(212,160,60,0.18);
}

/* ── Custom background sliders ── */
.mdf-custom-bg {
  background: #f4ecda;
  border: 1px solid #e4d6b8;
  border-radius: 10px;
  padding: 14px 14px 6px;
}
.mdf-slider-row { margin-bottom: 12px; }
.mdf-slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #6e5a3c;
  margin-bottom: 5px;
}
.mdf-slider-row label span { color: #b9842a; font-weight: 700; }
.mdf-slider-row input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: #ddd0b6;
  outline: none;
}
.mdf-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #D4A03C;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.mdf-slider-row input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border: none;
  border-radius: 50%;
  background: #D4A03C;
  cursor: pointer;
}

/* ── Bottom-RIGHT original site badge (inside post) ── */
.corner-site {
  position: absolute;
  bottom: 44px;
  right: 56px;
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 5;
}
.corner-site svg {
  width: 14px; height: 14px;
  fill: none; stroke: #D4A03C; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.corner-site span {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: rgba(212,160,60,0.9);
  text-transform: lowercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
