:root {
  --primary-color: #3b82f6;
  --secondary-color: #6366f1;
  --success-color: #387478;
  --light-gray: #eeedeb;
  --border-color: #dee2e6;
  --text-primary: #1f2937;
  --text-secondary: 262626;
  --text-muted: #9ca3af;
  --error-color: #ef4444;
  --background-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#nextBtn {
  width: 100% !important;
  display: flex;
  justify-content: end;
  background-color: red;
}

#submitBtn {
  text-wrap: nowrap !important;
}

.nav-right body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.4;
  color: var(--text-primary);
  height: 100vh;
  overflow-x: hidden;
}

.min-h-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-gradient {
  background: var(--background-gradient);
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container-form {
  max-width: 800px;
  max-height: 550px;
  border-radius: 5px;
  overflow-y: scroll;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: white;
}

/* Header */
.header {
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
  padding: 10px 0px;
  text-align: center;
  /* margin-bottom: 0.75rem; */
  margin-bottom: 0px !important;
  background-color: var(--primary-color);
  /* background: linear-gradient(135deg, #3b82f6, #6366f1); */
  color: white;
}

.header h1 {
  font-size: 1.2rem;
  font-weight: 600;
  /* color: var(--primary-color); */
  margin-bottom: 0.25rem;
}

.header p {
  font-size: 0.8rem;
  /* color: var(--text-secondary); */
}

/* Progress Section */
.progress-section {
  margin-bottom: 0.75rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-text,
.progress-percentage {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  height: 0.375rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 9999px;
  transition: width 0.5s ease;
  width: 20%;
}

/* Step Indicators */
.step-indicators {
  display: none;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.728);
  color: black;
  transition: all 0.3s ease;
}

.step-item.active .step-icon {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.step-item.completed .step-icon {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.step-content {
  text-align: center;
}

.step-title {
  font-size: 0.7rem;
  font-weight: 500;
  color: black;
  /* color: red; */
}

.step-item.active .step-title {
  color: var(--primary-color);
  font-weight: 600;
}

.step-item.completed .step-title {
  color: #2273f4;
  font-weight: 600;
}

.step-description {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* Form Card */
.form-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  /* border-radius: 0.75rem; */
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 0;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-header {
  /* background: linear-gradient(135deg, #3b82f6, #6366f1); */
  color: white;
  padding: 0.5rem;
  /* border-radius: 0.75rem 0.75rem 0 0; */
}

.form-header h2 {
  font-size: 1rem;
  /* text-align: center; */
  font-weight: 600;
  color: #1a6ef5;
  /* color: red; */
  margin: 0;
}

.form-content {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
}

/* Form Steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Form Elements */
.form-group {
  margin-bottom: 0.875rem;
}

.form-group label {
  margin-bottom: 3px;
  /* font-weight: 600; */
}

.form-row {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: 1fr;
}

.form-row.three-columns {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

label {
  display: block;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Modern Input Styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea {
  width: 100%;
  padding: 0.7rem 0.4rem;
  border: none;
  border-bottom: 1px solid black;
  border-radius: 0.2rem;
  font-size: 0.8rem;
  color: #111111;
  background-color: rgba(248, 248, 248, 0.75);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #e2e8f0, #f1f5f9) border-box; */
  /* background-color: red; */
  /* box-shadow: 2px 2px 17px -1px rgba(214, 214, 214, 0.75); */
  /* -webkit-box-shadow: 2px 2px 17px -1px rgba(94, 94, 94, 0.75);
  -moz-box-shadow: 2px 2px 17px -1px rgba(94, 94, 94, 0.75); */
  position: relative;
}

textarea::placeholder {
  font-size: 0.8rem;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
  outline: none !important;
  /* border-color: var(--text-muted) !important; */
  /* border: none !important; */
  background-color: rgba(248, 248, 248, 0.75);
  /* box-shadow: 0 0 0 4px rgba(37, 77, 112, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1); */
  box-shadow: none !important;
  transform: none !important;
}

/* Email inputs - NO OUTLINE */
input[type="email"]:focus,
.email-input:focus {
  outline: none !important;
  border-color: var(--primary-color);
  /* background: linear-gradient(white, white) padding-box,
  linear-gradient(135deg, var(--primary-color), var(--secondary-color))
  border-box;
  box-shadow: 0 0 0 4px rgba(37, 77, 112, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px); */
  background-color: none;
  box-shadow: none;
  transform: none;
}
/* 
  
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
textarea:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-0.5px);
} */

/* Simple Select Styling */
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;
  font-size: 0.875rem;
  background-color: white;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 77, 112, 0.2);
}

/* Error States */
/* input.error,
textarea.error {
  border-color: var(--error-color);
  background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, var(--error-color), #fca5a5) border-box;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
} */

select.error {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
  font-style: italic;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Checkboxes */
.checkbox-container {
  max-height: 10rem;
  overflow-y: auto;
  border: 2px solid transparent;
  border-radius: 0.625rem;
  /* padding: 0.75rem; */
  background: linear-gradient(#f8fafc, #f8fafc) padding-box,
    linear-gradient(135deg, #e2e8f0, #f1f5f9) border-box;
  margin-top: 0.5rem;
}

.checkbox-grid {
  /* border: 1px solid red; */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0rem;
}

.checkbox-grid-products {
  grid-template-columns: repeat(3, 1fr) !important;
}

.checkbox-item {
  display: flex;
  align-items: center;
  /* justify-content: center; */
  height: min-content;
  cursor: pointer;
  /* font-weight: 400; */
  margin-bottom: 0rem !important;
  /* background-color: red; */
  position: relative;
  font-size: 0.8rem;
  padding: 0.5rem 0.5rem 0.5rem 1.8rem;
  border-radius: 0.5rem;
  /* background-color: red; */
  transition: all 0.2s ease;
}

.checkbox-item:hover {
  background-color: rgba(37, 77, 112, 0.05);
}

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

.checkmark {
  /* display: none; */
  position: absolute;
  top: 50%;
  left: 0.5rem;
  transform: translateY(-50%);
  height: 0.8rem;
  width: 0.8rem;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-item:hover input ~ .checkmark {
  border-color: var(--primary-color);
  /* box-shadow: 0 0 0 3px rgba(37, 77, 112, 0.1); */
}

.checkbox-item input:checked ~ .checkmark {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-color: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 3.7px;
  top: 1.6px;
  width: 1.9px;
  height: 5px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-item input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-item input:disabled ~ .checkmark {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.checkbox-item input:disabled {
  cursor: not-allowed;
}

.checkbox-item:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Error Messages */
.error-message {
  display: none;
  color: var(--error-color);
  font-size: 0.7rem;
  margin-top: 0.25rem;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}

.error-message.show {
  display: flex;
}

.error-message:before {
  content: "⚠";
  font-size: 0.8rem;
}

/* Info Note Inline */
.info-note-inline {
  color: #1e40af !important;
  font-style: normal !important;
  font-size: 0.68rem !important;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.info-note-inline i {
  font-size: 0.65rem;
}

/* Review Section */
.review-section {
  background: linear-gradient(
    135deg,
    rgba(113, 192, 187, 0.08),
    rgba(37, 77, 112, 0.08)
  );
  padding: 0.875rem;
  border-radius: 0.625rem;
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, rgba(113, 192, 187, 0.3), rgba(37, 77, 112, 0.3))
      border-box;
  margin-top: 0.875rem;
}

.review-section h6 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
}

.review-section p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.8rem;
}

/* Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-top: 1px solid var(--border-color);
}

.nav-right {
  display: flex;
  gap: 0.75rem;
  width: 100% !important;
  /* border: 1px solid red; */
  margin-left: auto;
}

/* .btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  position: relative;
  overflow: hidden;
} */

/* .btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--success-color)
  );
  color: white;
  box-shadow: 0 4px 12px rgba(37, 77, 112, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 77, 112, 0.4);
}

.btn-secondary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: white;
}

.btn-secondary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--success-color)
  );
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 77, 112, 0.3);
} */

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.toast {
  background-color: white;
  border: 1px solid var(--primary-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  animation: slideInRight 0.3s ease;
}

.toast.error {
  border-left: 4px solid var(--error-color);
}

.toast.success {
  border-left: 4px solid var(--primary-color);
}

.toast-header {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  font-size: 0.8rem;
}

.toast-body {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (min-width: 768px) {
  .bg-gradient {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-indicators {
    display: flex;
  }

  .header h1 {
    font-size: 1.3rem;
  }

  .header p {
    font-size: 0.9rem;
  }

  .form-content {
    padding: 1.25rem;
  }

  .form-header {
    padding: 0.5rem 1rem;
  }

  .form-header h2 {
    font-size: 1rem;
  }
  .nav-right {
    margin-left: 0;
    width: min-content !important;
    /* background-color: red; */
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .form-row.three-columns {
    grid-template-columns: 1fr;
  }

  .form-navigation {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .nav-right {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  /* .btn {
    flex: 1;
    justify-content: center;
  } */

  .header h1 {
    font-size: 1.125rem;
  }

  .step-icon {
    width: 2rem;
    height: 2rem;
  }

  #prevBtn {
    width: 100%;
  }
}

@media (max-height: 700px) {
  .header {
    margin-bottom: 0.5rem;
  }

  .progress-section {
    margin-bottom: 0.5rem;
  }

  .step-indicators {
    margin-bottom: 0.5rem;
  }

  .form-group {
    margin-bottom: 0.75rem;
  }

  .checkbox-container {
    max-height: 8rem;
  }
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

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