/* ===============================
   VARIABLES & BASE STRUCTURE
================================= */
:root {
  --accent: #03c04a;
  --accent-hover: #029c3e;
  --border-radius: 8px;
  --transition: 0.2s ease;
}

#dealer-form-wrapper {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f7f9fc;
}

#dealer-form-wrapper form {
  max-width: 800px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 0 10px #ddd;
}

#dealer-form-wrapper h2 {
  margin-bottom: 20px;
  color: #333;
}

/* ===============================
   FORM INPUTS & LABELS
================================= */
#dealer-form-wrapper .form-group {
  position: relative;
  margin-bottom: 20px;
}

#dealer-form-wrapper .form-group button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 20px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}
#dealer-form-wrapper .form-group button:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#dealer-form-wrapper .form-group input,
#dealer-form-wrapper .form-group textarea,
#dealer-form-wrapper .form-group select {
  width: 100%;
  padding: 14px 10px;
  font-size: 14px;
  border: 1px solid #212121;
  border-radius: var(--border-radius);
  background: #fff;
  outline: none;
  transition: border-color var(--transition), outline-color var(--transition),
    box-shadow var(--transition);
}

#dealer-form-wrapper .form-group textarea {
  resize: vertical;
}

#dealer-form-wrapper .form-group input:focus,
#dealer-form-wrapper .form-group textarea:focus,
#dealer-form-wrapper .form-group select:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
}

#dealer-form-wrapper .form-group label {
  position: absolute;
  top: 14px;
  left: 12px;
  background: #fff;
  color: #999;
  font-size: 14px;
  padding: 0 4px;
  pointer-events: none;
  transition: top var(--transition), font-size var(--transition),
    color var(--transition);
}

#dealer-form-wrapper .form-group input:focus + label,
#dealer-form-wrapper .form-group input:not(:placeholder-shown) + label,
#dealer-form-wrapper .form-group textarea:focus + label,
#dealer-form-wrapper .form-group textarea:not(:placeholder-shown) + label,
#dealer-form-wrapper .form-group select:focus + label,
#dealer-form-wrapper .form-group select:valid + label {
  top: -8px;
  left: 10px;
  font-size: 12px;
  color: var(--accent);
}

/* Hide default placeholder option styling */
#dealer-form-wrapper select option[disabled][hidden] {
  display: none;
}

/* ===============================
   PHONE INPUTS & VALIDATION
================================= */
#dealer-form-wrapper .phone-group {
  display: flex;
  align-items: center;
  position: relative;
}

#dealer-form-wrapper .phone-group .prefix {
  padding: 14px 12px;
  background: #fff;
  border: 1px solid #212121;
  border-right: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: 14px;
}

#dealer-form-wrapper .phone-group input {
  flex: 1;
  border-left: none;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

#dealer-form-wrapper .phone-group input + label {
  left: 60px;
}

#dealer-form-wrapper .validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--accent);
  display: none;
}

#dealer-form-wrapper .form-group.valid .validation-icon {
  display: block;
}

#dealer-form-wrapper .input-error {
  border-color: red !important;
  outline: none !important;
}

#dealer-form-wrapper .error-msg {
  color: red;
  font-size: 13px;
  margin-top: 5px;
  display: none;
}

/* ===============================
   STEP BUTTONS
================================= */
#dealer-form-wrapper .step-buttons button,
#dealer-form-wrapper button[type="submit"] {
  background: var(--accent);
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

#dealer-form-wrapper .step-buttons button:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#dealer-form-wrapper .step-buttons button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ===============================
   ROW STRUCTURES
================================= */
#dealer-form-wrapper .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 0;
}

#dealer-form-wrapper .form-row .form-group {
  flex: 1 1 30%;
  min-width: 200px;
}

/* ===============================
   STAFF COUNTER
================================= */
#dealer-form-wrapper .staff-counter {
  display: flex;
  align-items: center;
}

#dealer-form-wrapper .staff-counter input[type="number"] {
  width: 80px;
  text-align: center;
  padding: 10px;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
}

#dealer-form-wrapper .staff-counter button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 16px;
}

#dealer-form-wrapper .staff-counter button:hover {
  background: var(--accent-hover);
}

#dealer-form-wrapper .staff-counter button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ===============================
   MODERN FILE UPLOAD UI
================================= */
.modern-upload {
  margin-bottom: 30px;
}

.modern-upload-box {
  border: 1.5px dashed #ccc;
  padding: 12px;
  border-radius: var(--border-radius);
  background: #fafafa;
  text-align: center;
}

.upload-details {
  font-size: 13px;
  color: #333;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-progress-bar {
  height: 4px;
  background: #eee;
  border-radius: 2px;
  margin-top: 8px;
  display: none;
}

.upload-progress-bar .bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

.upload-success-icon {
  color: var(--accent);
  font-size: 15px;
  display: none;
}

/* ===============================
   GROUPING STYLES
================================= */
.grouped-field {
  border: 1px solid #ddd;
  padding: 16px;
  border-radius: var(--border-radius);
  background: #fefefe;
  margin-bottom: 20px;
}

.grouped-label {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
  display: block;
  color: #333;
}

.grouped-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===============================
   RESPONSIVE
================================= */
@media (max-width: 768px) {
  #dealer-form-wrapper .form-row {
    flex-direction: column;
  }

  #dealer-form-wrapper .form-row .form-group {
    flex: 1 1 100%;
  }

  #dealer-form-wrapper form {
    padding: 20px;
  }

  #dealer-form-wrapper .step-buttons button {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* ===============================
   STAFF COUNTER - PLUS/MINUS UI
================================= */
#dealer-form-wrapper .form-group.staff-group {
  position: relative;
  margin-bottom: 20px;
}

#dealer-form-wrapper .form-group.staff-group .staff-counter {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

#dealer-form-wrapper .form-group.staff-group input[type="number"] {
  flex: 1;
  text-align: center;
  padding: 16px 10px;
  border: 1px solid #212121;
  border-radius: 0;
  transition: border-color var(--transition);
  background: none;
  border-width: 1px 0;
}

#dealer-form-wrapper .form-group.staff-group label {
  position: absolute;
  left: 50px !important;
  top: 14px;
  color: #999;
  background: white;
  padding: 0 4px;
  font-size: 14px;
  pointer-events: none;
  transition: 0.2s ease all;
}

/* Shift input padding so icon doesn’t overlap text */
#dealer-form-wrapper input[name="staff_count"]::-webkit-inner-spin-button,
#dealer-form-wrapper input[name="staff_count"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#dealer-form-wrapper input[name="staff_count"] {
  -moz-appearance: textfield; /* Firefox */
  -webkit-appearance: none; /* Safari and Chrome */
  appearance: none; /* Modern browsers */
}

#dealer-form-wrapper .form-group.staff-group input:focus + label,
#dealer-form-wrapper
  .form-group.staff-group
  input:not(:placeholder-shown)
  + label {
  top: -8px;
  left: 10px;
  font-size: 12px;
  color: var(--accent);
}

#dealer-form-wrapper .staff-counter button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14.5px 14px;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--transition);
  border: 1px solid #212121;
}

#dealer-form-wrapper .staff-counter button.plus-btn {
  border-radius: 0 8px 8px 0;
}

#dealer-form-wrapper .staff-counter button.minus-btn {
  border-radius: 8px 0 0 8px;
}

#dealer-form-wrapper .staff-counter button:hover:not(:disabled) {
  background: var(--accent-hover);
}

#dealer-form-wrapper .staff-counter button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#dealer-form-wrapper .field-underline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===============================
   MODERN UPLOAD GROUP PATCH
================================= */
#dealer-form-wrapper .modern-upload {
  margin-bottom: 30px;
}

#dealer-form-wrapper .modern-upload-label {
  font-weight: 500;
  display: block;
  color: var(--accent);
  font-size: 13px;
  position: absolute;
  margin-left: 11px;
  margin-top: -10px;
  background: #fff;
  padding: 0 4px;
}

#dealer-form-wrapper .modern-upload-box {
  border: 1px dashed #ccc;
  padding: 20px;
  text-align: center;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.3s ease;
}

#dealer-form-wrapper .custom-upload-btn {
  background: var(--accent);
  color: white;
  padding: 10px 24px;
  font-size: 14px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background 0.3s ease;
}
#dealer-form-wrapper .custom-upload-btn:hover {
  background: var(--accent-hover);
}
#dealer-form-wrapper .custom-upload-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#dealer-form-wrapper .upload-details {
  margin-top: 10px;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#dealer-form-wrapper .upload-progress-bar {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
  display: none;
}

#dealer-form-wrapper .upload-progress-bar .bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

#dealer-form-wrapper .upload-success-icon {
  color: var(--accent);
  display: none;
  font-size: 18px;
}

/* Error Highlight for Modern Upload */
#dealer-form-wrapper .modern-upload.input-error .modern-upload-box {
  border-color: red;
}

/*===============================
   PHOTO UPLOAD GRID
================================= */
#dealer-form-wrapper .photo-upload-wrapper {
  margin: 10px 0;
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
}

#dealer-form-wrapper .photo-upload-wrapper .section-label {
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 10px;
  display: block;
  color: var(--accent);
  position: absolute;
  margin-top: -28px;
  background: #fff;
  padding: 0 5px;
  margin-left: -7px;
}

#dealer-form-wrapper .photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}

#dealer-form-wrapper .photo-tile {
  width: 120px;
  height: 120px;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.3s;
}

#dealer-form-wrapper .photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  animation: fadeIn 0.4s ease-in-out;
}

#dealer-form-wrapper .add-photo-tile {
  font-size: 24px;
  color: #aaa;
  justify-content: center;
  align-items: center;
  border-style: dashed;
}

#dealer-form-wrapper .photo-tile.valid {
  border-color: var(--accent, #03c04a);
}

#dealer-form-wrapper .photo-tile .remove-tile {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

#dealer-form-wrapper .photo-tile .remove-tile:hover {
  background: rgba(0, 0, 0, 0.8);
}

#dealer-form-wrapper .photo-tile.uploading {
  background: #f9f9f9;
}

#dealer-form-wrapper .photo-tile.uploading .progress-tile {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 6px;
  width: 100%;
  background: #eee;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

#dealer-form-wrapper .photo-tile.uploading .progress-tile .bar {
  height: 100%;
  background: var(--accent, #03c04a);
  width: 0%;
  transition: width 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0.2;
  }
  to {
    opacity: 1;
  }
}

/* Latest tiil now 22 */
/* Error styling (optional) */
#dealer-form-wrapper .photo-upload-wrapper.input-error .photo-grid {
  border: 1px solid red;
  padding: 5px;
  border-radius: 6px;
}

#dealer-form-wrapper .photo-upload-wrapper .photo-error-msg {
  color: red;
  font-size: 13px;
  margin-top: 6px;
}

/* ===============================
   BRAND TAG INPUT
================================= */
.floating-brand-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.floating-brand-wrapper .tag-label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
}

.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border: 1px solid #212121;
  border-radius: var(--border-radius);
  background: #fff;
  min-height: 48px;
  transition: border-color var(--transition), outline var(--transition);
  position: relative;
}

.tag-input-container:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
}

.tag-input-container input {
  border: none !important;
  outline: none !important;
  flex: 1;
  min-width: 120px;
  font-size: 14px;
  padding: 0;
  background: transparent;
}

/* Tag pill styles */
.tag-pill {
  background: var(--accent);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
  height: fit-content;
}

.tag-pill .remove-pill {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
}

.tag-pill .remove-pill:hover {
  opacity: 0.85;
}

/* Hidden field for submission */
#brands-hidden {
  display: none;
}
.fixed-label-tag-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.fixed-label-tag-wrapper label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
}

.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--border-radius);
  background: #fff;
  min-height: 42px;
  transition: border-color var(--transition), outline var(--transition);
}

.tag-input-container input {
  border: none !important;
  outline: none !important;
  flex: 1;
  min-width: 120px;
  font-size: 14px;
  padding: 4px 0;
  margin: 0;
  background: transparent;
}

/* Pill styles */
.tag-pill {
  background: var(--accent);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  height: fit-content;
}

.tag-pill .remove-pill {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
}

.tag-pill .remove-pill:hover {
  opacity: 0.85;
}

/* Hidden input */
#brands-hidden {
  display: none;
}

#dealer-form-wrapper .form-group.floating-brand-wrapper label.tag-label {
  position: absolute;
  top: -9px;
  left: 12px;
  background: #fff;
  color: var(--accent, #03c04a);
  font-size: 12px;
  padding: 0 4px;
  pointer-events: none;
  transition: top var(--transition), font-size var(--transition),
    color var(--transition);
  z-index: 1;
}

#dealer-form-wrapper ul.upload-establishment-photos {
  font-size: 11px;
  font-weight: 500;
  padding: 0;
  list-style: none;
  text-transform: inherit;
  font-style: italic;
}

#dealer-form-wrapper ul.upload-establishment-photos li {
  float: left;
  padding: 0 2px;
}
#dealer-form-wrapper ul.upload-establishment-photos li:before {
  content: "|";
  color: var(--accent);
  padding-right: 4px;
}
#dealer-form-wrapper ul.upload-establishment-photos li:first-child:before {
  content: "";
}

.onboarding-terms-conditions {
  max-height: 400px;
  overflow-x: hidden;
  font-size: 14px;
  border: 2px solid #c0c0c0;
  padding: 20px;
  border-radius: 8px;
  overflow-y: scroll;
}

.onboarding-terms-conditions h3 {
  font-size: 18px;
  font-weight: 600;
}

.onboarding-terms-conditions h4 {
  font-size: 16px;
  font-weight: 600;
}

.onboarding-terms-conditions p {
  font-size: 13px;
}

.onboarding-terms-coditions-agreed {
  margin: 15px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 15px;
}
.custom-checkbox {
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-checkbox .checkmark {
  position: absolute;
  left: 0;
  top: 0;
  height: 25px;
  width: 25px;
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkmark {
  background-color: var(--accent);
  border-color: var(--accent);
}

.custom-checkbox .checkmark i {
  display: none;
  font-size: 14px;
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkmark i {
  display: inline-block;
}