/* ===== INDEX3 FORM STYLING ===== */
/* Clean, minimal form design - no icons */

/* ===== TOP UI OVERRIDE ===== */
.top-ui{min-height:0!important;padding-bottom:90px!important}

/* ===== HIGHLIGHT FIELD FOR VALIDATION ===== */
@keyframes highlightPulse{
  0%{box-shadow:0 0 0 0 rgba(142,31,31,0.5);border-color:#8e1f1f}
  50%{box-shadow:0 0 0 6px rgba(142,31,31,0.2);border-color:#8e1f1f}
  100%{box-shadow:0 0 0 0 rgba(142,31,31,0);border-color:#d1d5db}
}
.highlight-field{
  animation:highlightPulse 2s ease;
  border-color:#8e1f1f!important;
  outline:none
}

/* Override index.min.css icon padding residue */
.form-card {
  padding: 1.5rem 0 !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.187) !important;
  border: none !important;
  border-radius: 22px !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}
.form-section-wrapper {
  padding: 0 0 44px !important;
  margin-top: -100px !important;
}
.form-intro-guide {
  margin: 0 0 20px 0 !important;
  border-radius: 0 !important;
  padding: 14px 20px !important;
}
@media (max-width: 900px) {
  .form-card {
    padding: 10px 0 30px 0 !important;
  }
  .form-section-wrapper {
    padding: 0px 16px 44px 16px !important;
  }
  .form-intro-guide {
    margin: 0 0 15px 0 !important;
    padding: 10px 14px !important;
  }
}

::selection {
  background-color: #8e1f1f;
  color: #fff
}

::-moz-selection {
  background-color: #8e1f1f;
  color: #fff
}

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

.layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent
}

.form-section {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0
}

/* ===== PHOTO SECTION ===== */
.photo-section {
  background: #fff;
  padding: 18px !important;
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  margin-left: 12px;
  margin-right: 12px
}

.photo-box {
  position: relative;
  width: 100%;
  cursor: pointer;
  display: grid !important;
  grid-template-columns: 72px 1fr !important;
  gap: 1rem;
  margin: 0px !important;
  padding: 0px !important;
  align-items: center;
  grid-auto-flow: dense
}

.photo-placeholder {
  width: 72px;
  height: 100px;
  border-radius: 8px;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 1.5px dashed #a6a6a6;
  cursor: pointer
}

.photo-placeholder:hover {
  background: #ffffff;
  border-color: #696969
}

.add-photo-icon {
  width: 22px;
  height: 22px;
  color: #000000;
  pointer-events: none
}

.photo-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start !important;
  text-align: left;
  width: 100%;
  padding-left: 0
}

.photo-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  text-align: left
}

.photo-subtitle {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
  text-align: left
}

.photo-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid #8e1f1f;
  border-radius: 50px;
  background: #fff;
  color: #8e1f1f;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  width: fit-content;
  margin-left: 0;
  margin-right: auto
}

.photo-upload-btn:hover {
  background: #fef2f2;
  box-shadow: 0 2px 8px rgba(142, 31, 31, 0.2)
}

.photo-upload-btn:active {
  transform: scale(0.98)
}

.photo-upload-btn.remove-mode {
  background: #8e1f1f;
  color: #fff;
  border-color: #8e1f1f
}

.photo-upload-btn.remove-mode:hover {
  background: #7a1616;
  border-color: #7a1616
}

.photo-upload-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0
}

#imagePreview {
  display: none;
  width: 72px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  grid-column: 1;
  grid-row: 1;
  cursor: pointer
}

#imagePreview.show {
  display: block
}

#imagePreview.show ~ .photo-placeholder {
  display: none
}

.photo-box.has-photo .photo-placeholder {
  display: none
}

#imageInput {
  display: none
}

@media (max-width: 600px) {
  .photo-box {
    grid-template-columns: 1fr;
    gap: 1rem
  }
  
  .photo-placeholder {
    width: 72px;
    margin: 0 auto
  }
  
  .photo-content-wrapper {
    align-items: center;
    text-align: center
  }
  
  #imagePreview.show {
    width: 72px;
    margin: 0 auto
  }
}

/* ===== VIEW ALL TEMPLATES BUTTON ===== */
.view-templates-btn {
  margin: 16px auto 32px !important;
}
.hero {
  text-align: center;
  overflow-x: hidden
}

.top-ui-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 55px;
  padding: 0 2.5rem;
  margin: 16px auto 100px auto;
  background-color: #8e1f1f;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.15s ease
}

.top-ui-create-btn:hover {
  background-color: #7a1a1a;
  transform: translateY(-2px)
}

.top-ui-create-btn:active {
  transform: translateY(0)
}
  /* box-shadow: 0 6px 25px rgba(142, 31, 31, 0.4)
} */ */
.section {
  margin-bottom: 1.5rem
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(142, 31, 31, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.section-icon svg {
  width: 22px;
  height: 22px;
  color: #8e1f1f
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.section-title-wrap h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  padding: 0;
  border: none;
  text-decoration: none
}

.section-title-wrap .section-subtitle-text {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
  font-weight: 400
}

/* ===== SECTION CARD (wraps the fields) ===== */
.section-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: none;
  padding: 0;
  margin-bottom: 0.5rem
}

/* ===== FIELDS ===== */
.fields {
  display: flex;
  flex-direction: column;
  gap: 1.4rem
}

.field-card {
  display: flex;
  flex-direction: column;
  gap: 0
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 8px;
}

.field-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  flex: 1;
}

.field-card label .required {
  color: #dc2626;
  margin-left: 2px
}

.field-delete-btn {
  background: #fad1d1;
  border: none;
  border-radius: 999px;
  color: #000000;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 34px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.1s ease;
}

.field-delete-btn:hover:not(:disabled) {
  opacity: 1;
}

.field-delete-btn:disabled {
  display: none;
  color: #d1d5db;
  opacity: 0.4;
  cursor: not-allowed;
}

.label-spacer {
  flex-grow: 1;
  pointer-events: none;
}

/* Editable Label Styling */
.editable-label {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  border-radius: 4px;
  min-width: 100px;
  max-width: 200px;
  word-wrap: break-word;
  white-space: normal;
  display: inline-block;
  flex: 0 1 auto;
}

.editable-label:hover {
  background-color: transparent;
  color: #b91c1c;
}

.label-edit-input {
  min-width: 100px !important;
  word-wrap: break-word !important;
  white-space: normal !important;
  padding: 4px 8px !important;
  border: 2px solid #b91c1c !important;
  border-radius: 4px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  font-family: inherit !important;
  outline: none !important;
}

.field-card-inner {
    padding: 0;
  position: relative;
  width: 100%
}

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

.field-card-inner input,
.field-card-inner textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 10px;
  border: 1px solid #898989;
  border-radius: 2px;
  font-size: 0.95rem;
  color: #1f2937;
  background: transparent;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s ease;
  appearance: none
}

.field-card-inner select {
  width: 100%;
  min-height: 48px;
  padding: 12px 40px 12px 10px;
  border: 1px solid #898989;
  border-radius: 2px;
  font-size: 0.95rem;
  color: #1f2937;
  background: transparent;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s ease;
  appearance: none
}

.field-card-inner input::placeholder,
.field-card-inner select::placeholder,
.field-card-inner textarea::placeholder {
  color: #c5c7cf
}

.field-card-inner input:hover,
.field-card-inner select:hover,
.field-card-inner textarea:hover {
  border-color: #8e1f1f
}

.field-card-inner input:focus,
.field-card-inner select:focus,
.field-card-inner textarea:focus {
  outline: none;
  border-color: #8e1f1f;
  box-shadow: 0 0 0 3px rgba(142, 31, 31, 0.1);
  background: #faf9f7
}

.field-card-inner textarea {
  min-height: 100px;
  padding: 12px 10px;
  resize: vertical
}

.field-card-inner .field-icon {
  display: none
}

.field-card-inner .select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid #fff0;
  border-right: 5px solid #fff0;
  border-top: 6px solid #8e1f1f;
  pointer-events: none
}

/* ===== ADD MORE ===== */
.add-more-row {
  margin-top: 8px;
  margin-bottom: 42px;
  padding-top: 0;
  border-top: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start
}

.add-more {
  display: inline;
  padding: 0;
  background: none;
  color: #8e1f1f;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  /* text-decoration: underline */
}

.add-more:hover {
  background: none;
  border-color: transparent;
  opacity: 0.8
}

.add-more-hint {
  display: inline;
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
  font-weight: 400
}

/* ===== FORM ACTIONS ===== */
.form-actions {
  margin-bottom: 2px;
  margin-top: 0px !;
  display: flex;
  gap: 1rem;
  justify-content: center
}

.primary-btn {
    width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 12px 2rem;
  min-height: 55px;
  background: #8e1f1f;
  color: #fff;
  border: none;
  border-radius: 9999px !important;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none !important;
  margin: 12px 24px 0 24px !important
}

.primary-btn:hover {
  background: #7a1a1a;
  transform: translateY(-2px);
  box-shadow: none !important
}

.primary-btn:active {
  transform: translateY(0)
}

.btn-arrow {
  width: 20px;
  height: 20px
}

/* ===== STICKY BUTTON ===== */
.sticky-form-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 0 12px 12px 12px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  z-index: 999;
  display: none;
}

.sticky-form-btn.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 50px;
  padding: 0 1.5rem;
  margin: 0;
  background-color: #8e1f1f;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  box-sizing: border-box
}

/* .sticky-create-btn:hover {
  background-color: #7a1a1a
} */

/* ===== BUTTON CONTAINER ===== */
.button-container {
  margin-top: 1rem;
  text-align: center;
  padding-bottom: 1rem
}

.secondary-btn {
  padding: 10px 1.5rem;
  background: transparent;
  color: #6b7280;
  margin-top: 22px;
  border: 1px solid #d1d5db;
  border-radius: 66px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease
}

.secondary-btn:hover {
  border-color: #a78bfa;
  color: #7c3aed;
  background: #f3e8ff
}

/* ===== FORM INTRO GUIDE ===== */
.form-intro-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: transparent !important;
  border-radius: 0;
  border: none !important;
  border-bottom: none !important;
  margin-bottom: 2rem;
  flex-wrap: wrap
}

.form-intro-guide p {
  color: #000;
  /* font-size: 1.25rem; */
  margin: 0;
  text-align: center
}

.form-intro-guide p strong {
  color: #8e1f1f
}

.fig-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem
}

.fig-num {
  width: 32px;
  height: 32px;
  background: #e9d5ff;
  color: #7c3aed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem
}

.fig-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap
}

.fig-arrow {
  color: #d1d5db;
  font-size: 1.5rem;
  display: none
}

@media (min-width: 640px) {
  .fig-arrow {
    display: block
  }
}

.fig-step--active .fig-num {
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3)
}

/* ===== FORM LOADING ===== */
.form-loading {
  display: none;
  text-align: center;
  padding: 3rem 1rem
}

.form-card.loading .form-loading {
  display: block
}

.form-card.loading main {
  display: none
}

.form-card main {
  display: block !important
}

.form-loading__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9d5ff;
  border-top-color: #7c3aed;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite
}

@keyframes spin {
  to { transform: rotate(360deg) }
}

.form-loading__text {
  color: #6b7280;
  font-weight: 500
}

.form-card.is-ready {
  visibility: visible;
  opacity: 1
}

/* ===== VIEW ALL TEMPLATES BUTTON ===== */
.templates-view-all {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding: 0 0px
}

.templates-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: transparent;
  color: #8e1f1f;
  border: 1px solid #8e1f1f;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease
}

.templates-view-all-btn:hover {
  background: #8e1f1f;
  color: #fff
}

.templates-arrow {
  font-size: 0.9rem;
  font-weight: 700
}
.templates-preview-section {
  background: transparent;
  padding: 40px 20px;
  margin: 40px 0
}

.templates-preview-container {
  max-width: 1160px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
  padding: 40px 20px
}

.templates-header {
  text-align: center;
  margin-bottom: 30px
}

.templates-title {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 15px 0
}

.templates-description {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6
}

.templates-gallery-wrapper {
  overflow: visible
}

.templates-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  padding: 0
}

.template-card {
  width: 100%;
  aspect-ratio: 210 / 297;
  background: white;
  cursor: pointer
}

.template-card:hover {
  border-color: #5127db
}

.template-card img {
  width: 100%;
  height: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 2px;
  object-fit: cover;
  display: block
}

@media (max-width: 900px) {
  .templates-preview-section {
    padding: 28px 16px 12px 16px;
    margin: 0
  }
  .templates-preview-container {
    padding: 30px 16px
  }
  .templates-header {
    margin-bottom: 20px
  }
  .templates-title {
    font-size: 24px;
    margin-bottom: 10px
  }
  .templates-description {
    font-size: 14px
  }
  .templates-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
  }
}

/* ===== VIDEO SECTION CARD ===== */
.video-sec {
  margin-left: 12px !important;
  margin-right: 12px !important
}

/* ===== FAQ CARD ===== */
.faq {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  border: 1px solid #e5e7eb !important;
  padding: 2rem 1.5rem !important;
  max-width: 800px !important;
  margin: 12px !important
}
@media (max-width: 640px) {
  .form-section {
    padding: 1rem
  }

  .photo-section {
    padding: 2rem 1rem
  }

  .form-intro-guide {
    gap: 1rem
  }

  .field-card-inner input,
  .field-card-inner select,
  .field-card-inner textarea {
    padding: 10px 12px;
    font-size: 16px
  }

  .section-card {
    padding: 0
  }
}

/* ===== CUSTOM VALUE DIALOG ===== */
.custom-value-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  padding: 20px;
  font-family: inherit;
}

.custom-value-dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  gap: 12px;
}

.dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.dialog-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.dialog-content {
  padding: 20px;
}

.custom-input {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid #898989;
  border-radius: 4px;
  font-size: 15px;
  color: #1f2937;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.custom-input:focus {
  outline: none;
  border-color: #6b3939;
  box-shadow: 0 0 0 3px rgba(107, 57, 57, 0.1);
}

.custom-input::placeholder {
  color: #c5c7cf;
}

.dialog-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  justify-content: flex-end;
}

.dialog-cancel,
.dialog-add {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.dialog-cancel {
  background: #f3f4f6;
  color: #374151;
}

.dialog-cancel:hover {
  background: #e5e7eb;
}

.dialog-add {
  background: #8e1f1f;
  color: #fff;
}

.dialog-add:hover {
  background: #6b1818;
}

.dialog-add:active {
  transform: scale(0.98);
}
