/* Lead Manager Public Styles */

/* Lead form wrapper */
.lead-form-wrapper {
  max-width: 600px;
  margin: 30px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lead-form-wrapper.transparent {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.lead-form-section {
  margin-bottom: 30px;
}

.lead-form-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #23282d;
  font-size: 24px;
  text-align: center;
}

/* Form groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #23282d;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select,
.mileage-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s;
  background: #fff;
}
input#registration_number_hero {
    font-size: 24px;
    border: none !important;
    text-align: center;
    padding: 8px;
}
.form-group select,
.mileage-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%228%22 viewBox=%220 0 12 8%22%3e%3cpath fill=%22%23333%22 d=%22M6 8L0 0h12z%22/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 35px;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
}

.form-group textarea {
  resize: vertical;
}

/* Registration number field */
.form-group.reg-number-group {
  position: relative;
}

#registration_number {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 18px;
  padding-left: 50px;
  background: #f5f5f5;
}

#registration_number:focus {
  background: #fff;
  border-color: #e0e0e0;
}

.reg-number-flag {
  position: absolute;
  left: 1px;
  top: 33px;
  width: 32px;
  height: 51px;
  background: #003d82;
  border-radius: 8px 0px 0px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
}

/* Lookup button */
#lookup-vehicle-btn {
  width: 100%;
  margin-top: 15px;
  margin-left: 0;
  padding: 16px 32px;
  background: #c9002c !important;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(201, 0, 44, 0.3);
}

#lookup-vehicle-btn:hover {
  background: #a00023 !important;
  box-shadow: 0 4px 12px rgba(201, 0, 44, 0.4);
  transform: translateY(-1px);
}

#lookup-vehicle-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.vehicle-lookup-status {
  margin-left: 10px;
  font-size: 14px;
}

.vehicle-lookup-status.loading {
  color: #c9002c;
}

.vehicle-lookup-status.success {
  color: #00a32a;
}

.vehicle-lookup-status.error {
  color: #d63638;
}

/* Vehicle data card */
.vehicle-data-card {
  margin-top: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-left: 4px solid #c9002c;
  border-radius: 4px;
  animation: slideDown 0.3s ease-out;
}

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

.vehicle-data-card h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #0073aa;
}

.vehicle-data-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.vehicle-data-item {
  display: flex;
  flex-direction: column;
}

.vehicle-data-item strong {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vehicle-data-item span {
  font-size: 16px;
  color: #23282d;
  font-weight: 500;
}

/* Customer info section */
#customer-info-section {
  animation: fadeIn 0.5s ease-out;
}

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

/* Checkbox group */
.checkbox-group label {
  display: flex;
  align-items: flex-start;
  font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 10px;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Submit button */
#submit-lead-btn {
  width: 100%;
  padding: 16px 32px;
  background: #c9002c !important;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(201, 0, 44, 0.3);
}

#submit-lead-btn:hover {
  background: #a00023 !important;
  box-shadow: 0 4px 12px rgba(201, 0, 44, 0.4);
  transform: translateY(-1px);
}

#submit-lead-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Continue without data button */
#continue-without-data-btn {
  padding: 14px 24px;
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

#continue-without-data-btn:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

/* Form messages */
.form-message {
  padding: 15px;
  border-radius: 4px;
  margin-top: 20px;
  animation: slideDown 0.3s ease-out;
}

.form-message.success {
  background: #d5f4d5;
  border: 1px solid #00a32a;
  color: #00a32a;
}

.form-message.error {
  background: #fce4e4;
  border: 1px solid #d63638;
  color: #d63638;
}

/* reCAPTCHA */
.g-recaptcha {
  margin-bottom: 15px;
}

/* Loading state */
.loading:after {
  content: "...";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

/* Responsive */
@media (max-width: 768px) {
  .lead-form-wrapper {
    padding: 20px;
    margin: 20px auto;
  }

  .lead-form-section h3 {
    font-size: 20px;
  }

  .vehicle-data-content {
    grid-template-columns: 1fr;
  }

  #lookup-vehicle-btn {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
  }
}

/* Validation errors */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #d63638;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #00a32a;
}

/* Hero Form Styles */
.lead-hero-form-wrapper {
  text-align: center;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

.lead-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lead-hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 35px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 400;
}

.lead-hero-form {
    max-width: 200px !important;
    margin: 0 auto;
}

.reg-number-group-hero {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
}

.reg-number-flag-hero {
    width: 32px;
    background: #003d82;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 400;
    font-size: 20px;
    flex-shrink: 0;
}

.hero-reg-input {
  flex: 1;
  padding: 26px 28px;
  border: none;
  border-radius: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
  min-width: 0;
}

.hero-reg-input::placeholder {
  color: #999;
  letter-spacing: 2px;
}

.hero-lookup-btn {
    width: 100%;
    padding: 12px 25px;
    background: #c9002c;
    border: none;
    border-radius: 8px !important;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(201, 0, 44, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-lookup-btn:hover {
  background: #9a0022;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 0, 44, 0.4);
}

.hero-btn-arrow {
  transition: transform 0.3s ease;
}

.hero-lookup-btn:hover .hero-btn-arrow {
  transform: translateX(5px);
}

.vehicle-lookup-status-hero {
  display: block;
  margin-top: 15px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 20px;
}

.vehicle-lookup-status-hero.loading {
  color: #ffc107;
}

.vehicle-lookup-status-hero.success {
  color: #4caf50;
}

.vehicle-lookup-status-hero.error {
  color: #ff5252;
}

/* Responsive hero form */
@media (max-width: 768px) {
  .lead-hero-title {
    font-size: 1.75rem;
  }

  .lead-hero-subtitle {
    font-size: 1rem;
  }

  .reg-number-group-hero {
    flex-wrap: wrap;
  }

    .reg-number-flag-hero {
        width: 28px;
        font-size: 20px;
    }

  .hero-reg-input {
    padding: 15px;
    font-size: 16px;
  }

  .hero-lookup-btn {
    padding: 15px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .lead-hero-title {
    font-size: 1.5rem;
  }

  .reg-number-group-hero {
    flex-direction: row;
    flex-wrap: nowrap;
  }

    .hero-lookup-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Modal Styles */
#leadFormModal .modal-content {
  border: none;
  background: white;
}

#leadFormModal .modal-header {
  position: relative;
  top: auto;
  right: auto;
  z-index: 10;
  background: white;
  border: none;
  padding: 0;
  width: 100%;
}

#leadFormModal .modal-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

#leadFormModal .navbar-brand {
  margin: 0;
  padding: 0;
}

#leadFormModal .modal-logo {
  height: 60px;
  width: auto;
}

#leadFormModal .btn-close {
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
    center/1.2em auto no-repeat;
  opacity: 1;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  transition: all 0.3s;
}

#leadFormModal .btn-close:hover {
  opacity: 0.7;
  background-color: rgba(0, 0, 0, 0.05);
}

#leadFormModal .modal-body {
  padding: 40px 20px;
  overflow-y: auto;
}

.lead-modal-form-container {
  max-width: 600px;
  width: 100%;
  background: white;
  border-radius: 0;
  padding: 40px;
  box-shadow: none;
}

.modal-main-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #23282d;
  margin-bottom: 5px;
  text-align: left;
  line-height: 1.3;
}

.modal-subtitle {
  color: #6c757d;
  font-size: 1rem;
  margin-bottom: 30px;
}

/* Compact Vehicle Data */
.modal-vehicle-data-compact {
  background: linear-gradient(135deg, #c9002c 0%, #9a0022 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  color: white;
}

.vehicle-data-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.vehicle-data-header i {
  font-size: 1.4rem;
}

.vehicle-data-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.vehicle-data-item-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.vehicle-data-item-compact i {
  font-size: 1.3rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.vehicle-data-item-compact div {
  flex: 1;
  min-width: 0;
}

.vehicle-data-item-compact small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.vehicle-data-item-compact strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wrong registration button */
.modal-change-vehicle-btn {
  display: block;
  width: 100%;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

.modal-change-vehicle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.modal-change-vehicle-btn i {
  margin-right: 5px;
}

/* Customer Form Fields */
.customer-form-fields {
  margin-top: 20px;
}

#modal_display_registration_number {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  padding-right: 50px;
}

.registration-field-wrapper {
  position: relative;
}

.registration-edit-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #6c757d;
  transition: all 0.3s ease;
}

.registration-edit-btn:hover {
  color: #c9002c;
  background: transparent;
}

.registration-edit-btn.success {
  color: #28a745;
  background: transparent;
}

#leadFormModal .form-label {
  font-weight: 600;
  color: #23282d;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

#leadFormModal .form-label i {
  color: #c9002c;
}

#leadFormModal .form-control,
#leadFormModal .form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  transition: all 0.3s;
}

#leadFormModal .form-control:focus,
#leadFormModal .form-select:focus {
  border-color: #c9002c;
  box-shadow: 0 0 0 3px rgba(201, 0, 44, 0.1);
}

#leadFormModal .btn-primary {
  background: linear-gradient(135deg, #c9002c 0%, #9a0022 100%);
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: all 0.3s;
}

#leadFormModal .btn-primary:hover {
  background: linear-gradient(135deg, #9a0022 0%, #c9002c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 0, 44, 0.4);
}

/* Responsive modal */
@media (max-width: 768px) {
  .lead-modal-form-container {
    padding: 15px 12px;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    box-shadow: none;
  }

  .modal-main-title {
    font-size: 1.25rem;
    margin-bottom: 5px;
  }

  .modal-subtitle {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .vehicle-data-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .modal-vehicle-data-compact {
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
  }

  .vehicle-data-header {
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .vehicle-data-header i {
    font-size: 0.95rem;
  }

  .vehicle-data-item-compact {
    padding: 6px 8px;
    gap: 6px;
  }

  .vehicle-data-item-compact i {
    font-size: 0.95rem;
  }

  .vehicle-data-item-compact small {
    font-size: 0.6rem;
    margin-bottom: 1px;
  }

  .vehicle-data-item-compact strong {
    font-size: 0.8rem;
  }

  .customer-form-fields {
    margin-top: 8px;
  }

    .customer-form-fields .row {
        gap: 0px;
    }

  #leadFormModal .form-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  #leadFormModal .form-label i {
    font-size: 0.75rem;
  }

  #leadFormModal .form-control,
  #leadFormModal .form-select {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  #leadFormModal .btn-primary {
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  #leadFormModal .form-check-label {
    font-size: 0.75rem;
  }

  #leadFormModal .modal-body {
    padding: 15px 8px;
  }

  #leadFormModal .modal-header {
    padding: 12px;
  }

  #leadFormModal .btn-close {
    width: 28px;
    height: 28px;
    margin-right: 8px;
  }

  #modal-edit-registration-btn {
    padding: 8px 12px;
  }
}

/* Responsive hero form */
@media (max-width: 768px) {
  .lead-hero-title {
    font-size: 1.8rem;
  }
input#registration_number_hero {
    font-size: 18px;
    border: none !important;
    text-align: center;
    padding: 12px 10px;
}
  .lead-hero-subtitle {
    font-size: 1rem;
  }

  .reg-number-group-hero {
    flex-wrap: wrap;
  }

  .hero-reg-input {
    border-radius: 0 6px 0 0;
  }

  .hero-lookup-btn {
    width: 100%;
    border-radius: 8px;
    margin-top: -1px;
  }

  .reg-number-flag-hero {
    border-radius: 6px 0 0 0;
  }

  #leadFormModal .modal-header .container {
    padding: 0;
  }

    .modal-body.d-flex.align-items-center.justify-content-center.p-4 {
        padding: 0 !important;
        margin-top: -12 0px;
    }
    #modal-edit-registration-btn {
        padding: 5px 10px;
        margin-right: -1px;
    }
}
