/* ==============================
   GLOBAL
============================== */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

/* ==============================
   HEADER
============================== */

.header {
  padding: 20px 40px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 18px;
}

/* ==============================
   MAIN LAYOUT
============================== */

.main-container {
  max-width: 1500px;
  margin: 40px auto;
  padding: 0 20px;
}

.layout {
  display: flex;
  gap: 50px;
  background: #ffffff;
  /* border: 1px solid #e5e7eb; */
}

/* ==============================
   FORM SECTION
============================== */

.form-section {
  width: 65%;
}

.section {
  margin-bottom: 0px;
}

.section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 25px;
  margin-top: 32px;
}

/* ==============================
   FIELD WRAPPER (Card + Arrows)
============================== */

.field-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

/* ==============================
   WHITE FIELD CARD
============================== */

.field-card-inner {
  flex: 1;
  background: #ffffff;
  /* border: 1px solid #e5e7eb; */
  border-radius: 8px;
  /* padding: 18px 20px; */
  transition: border 0.2s ease;
}

.field-card-inner:hover {
  border-color: #d1d5db;
}

.field-card-inner label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

/* ==============================
   INPUTS
============================== */

.field-card-inner input,
.field-card-inner select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid #b0b7c5;
  background: #ffffff;
  font-size: 14px;
  color: #111827;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Textarea should visually match inputs (same font, background, width). Height can vary. */
.field-card-inner textarea {
  width: 100%;
  min-height: 46px;
  max-height: 220px; /* roughly 10 lines + padding */
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid #b0b7c5;
  background: #ffffff;
  font-size: 14px;
  color: #111827;
  box-sizing: border-box;
  line-height: 1.2;
  resize: vertical;
  overflow: auto;
}

.field-card-inner textarea:hover {
  border-color: #94a3b8;
}

.field-card-inner textarea:focus {
  outline: none;
  border-color: #db2777;
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.14);
  background: #ffffff;
}

.field-card-inner input:hover,
.field-card-inner select:hover {
  border-color: #94a3b8;
}

.field-card-inner input:focus,
.field-card-inner select:focus {
  outline: none;
  border-color: #db2777;
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.14);
  background: #ffffff;
}

/* ==============================
   SELECT ARROW
============================== */

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #6b7280;
}

/* ==============================
   ACTION COLUMN (ARROWS)
============================== */

.action-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

/* Circular Buttons */
.action-column button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Arrow Buttons */
.action-column .up,
.action-column .down {
  background: #f0f0f0;
  color: #515151;
}

.action-column .up:hover,
.action-column .down:hover {
  background: #e2e8f0;
}

/* Delete Button */
.action-column .delete {
  background: #ffdbdb;
  color: #ff5858;
}

.action-column .delete:hover {
  background: #ffc4c4;
}

/* ==============================
   ADD MORE LINK
============================== */

.add-more {
  font-size: 12px;
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
  margin-top: -5px;
}

.add-more:hover {
  text-decoration: underline;
}

/* ==============================
   PHOTO SECTION
============================== */
.photo-section {
  width: 20%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.photo-box {
  margin-top: 64px;
  width: 250px;
  aspect-ratio: 8 / 12;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border 0.2s ease;
}

.photo-box:hover {
  border-color: #6366f1;
}

.photo-box.has-photo {
  border-style: solid;
  border-color: #cbd5e1;
}

.photo-box.has-photo:hover {
  border-color: #a1a1aa;
}

/* IMAGE */
.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* PLACEHOLDER */
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
}

.camera-icon svg {
  width: 28px;
  height: 28px;
}

/* OVERLAY */
.photo-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.65);
  color: white;
  padding: 10px 0;
  font-size: 13px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: 0.2s ease;
}

.photo-overlay svg {
  width: 14px;
  height: 14px;
}

/* DELETE BUTTON */
.photo-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.photo-delete svg {
  width: 14px;
  height: 14px;
}

.photo-delete:hover {
  background: white;
  transform: scale(1.05);
}
/* ==============================
   FORM ACTIONS
============================== */

.form-actions {
  margin-top: 0;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 768px) {
  .form-actions {
    align-items: flex-start;
  }
}

.toggle-footer-btn {
  width: 100%;
  max-width: 300px;
  margin: 20px auto 0;
  padding: 10px 20px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-footer-btn:hover {
  background: #e5e7eb;
}

.button-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 40px 0 20px;
}

.toggle-details-btn {
  width: auto;
  max-width: 300px;
  margin: 0;
  padding: 12px 20px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: block;
}

.toggle-details-btn:hover {
  background: #e5e7eb;
}

/* ==============================
   PRIMARY BUTTON
============================== */

.primary-btn {
  width: 100%;
  min-height: 50px;
  max-width: 500px;
  padding: 13px 20px;
  background: linear-gradient(90deg, #f97316 0%, #db2777 100%);
  color: #ffffff;
  border: none;
  margin-top: 24px;
  border-radius: 55px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-decoration: none;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: none;
  filter: brightness(1.03);
}

.secondary-btn {
  width: auto;
  max-width: 500px;
  margin: 0;
  padding: 10px 16px;
  background: transparent;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.secondary-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 900px) {

  .layout {
    flex-direction: column;
    padding: 25px 0px 25px 0px;
  }

  .photo-section {
    order: -1;
    margin-top:0px;
    margin-bottom: 0px;
    width: 100%;
  }

  .form-section {
    width: 100%;
  }

  .photo-box {
    width: 100%;
    max-width: 120px;
        margin-top:0px;
    margin-bottom: 0px;
  }

  .form-actions {
    margin-bottom: 16px;
  }
}

/* ACTION AREA */
.action-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  background: transparent;
  border: none;
}

/* Vertical arrows */
.arrow-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* Buttons base */
.arrow-column button,
.action-area .delete {
  width: 28px;
  height: 28px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: transparent;
  line-height: 1;
  transition: color 0.2s ease, transform 0.15s ease;
}

.arrow-column button svg {
  margin-top: 8px;
  width: 24px;
  height: 24px;
}


/* Arrow style */
.arrow-column .up,
.arrow-column .down {
  background: transparent;
  color: #64748b;
}

.arrow-column .up:hover,
.arrow-column .down:hover {
  color: #0f172a;
  transform: scale(1.08);
}

/* Delete style */
.action-area .delete {
  margin-bottom: 4px;
  display: flex;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
  /* border: 1px solid #fecdd3; */
}

.action-area .delete svg {
  width: 14px;
  height: 14px;
}

.action-area .delete:hover {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fda4af;
  transform: translateY(-1px);
}