/* Popup redesign styles */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
}

.modal.modal--open {
  display: flex;
}

.modal--help {
  z-index: 1200;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.modal__footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.modal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #475569;
  background: #e7e9ee;
  margin: 0 auto 1.25rem;
}

.modal-meta {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}

.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.modal-trust-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.trust-cell {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.trust-cell__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  background: rgba(148, 163, 184, 0.12);
  box-shadow: none;
}

.trust-cell__icon--star {
  color: #f59e0b;
}

.trust-cell__icon--zap {
  color: #3b82f6;
}

.trust-cell__icon--shield {
  color: #059669;
}

.trust-cell__value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #111827;
}

.trust-cell__label {
  font-size: 0.75rem;
  color: #6b7280;
}

.quotes-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #bbf7d0 100%);
  color: #047857;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
  margin: 1.5rem auto 0;
}

.quotes-pill:empty {
  display: none;
}

@media (max-width: 640px) {
  .modal-trust-grid {
    gap: 1rem;
  }

  .trust-cell {
    min-width: 0;
    max-width: none;
    flex: 1 1 calc(50% - 1rem);
  }

  .quotes-pill {
    width: 100%;
  }
}

.form-modal {
  max-width: 640px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 24px;
  padding: 2rem 2.5rem 2.5rem;
}

@media (max-width: 640px) {
  .form-modal {
    padding: 1.5rem;
    border-radius: 18px;
  }
}

.modal-header {
  position: relative;
  padding: 2rem 2rem 1.75rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2rem;
  text-align: center;
}

.valuation-header {
  padding: 2.25rem 2rem 2rem;
  border-bottom: 1px solid #e7ecf2;
}

.modal__title {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.modal__subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0.5rem auto 0;
  max-width: 32rem;
}

.valuation-header__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.valuation-header__subtitle {
  font-size: 1.1rem;
  margin-top: 0.75rem;
  line-height: 1.65;
  color: #475569;
}

.valuation-header__note {
  color: #64748b;
  font-size: 0.95rem;
  max-width: 30rem;
  margin: 0.75rem auto 0;
}

.valuation-header__stats {
  margin-top: 1.75rem;
  gap: 1.75rem;
}

.valuation-header__stats .trust-cell {
  background: #f8fafc;
  padding: 1.1rem;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.valuation-header__stats .trust-cell__icon {
  width: 42px;
  height: 42px;
  font-size: 1rem;
  background: rgba(99, 102, 241, 0.08);
  color: #1f2937;
}

.valuation-header__stats .trust-cell__icon--star {
  background: rgba(234, 179, 8, 0.12);
  color: #f59e0b;
}

.valuation-header__stats .trust-cell__icon--zap {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.valuation-header__stats .trust-cell__icon--shield {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.valuation-header__stats .trust-cell__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.valuation-header__stats .trust-cell__label {
  color: #6b7280;
  font-size: 0.8rem;
}

.valuation-header__activity {
  margin-top: 1.85rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #bbf7d0 100%);
  color: #047857;
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.18);
}

@media (max-width: 640px) {
  .valuation-header__stats .trust-cell {
    padding: 0.85rem;
  }
}

.material-guide {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.material-guide__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.material-guide__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: rgba(0, 212, 170, 0.12);
  color: #047857;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.material-guide__content h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #1a1d29;
}

.material-guide__content p {
  margin-bottom: 0.75rem;
  color: #4b5563;
  line-height: 1.65;
}

.material-guide__content p:last-child {
  margin-bottom: 0;
}

.material-guide__list {
  margin: 0 0 0.75rem 0;
  padding-left: 1.25rem;
  color: #4b5563;
  list-style: disc;
}

.material-guide__list li {
  margin-bottom: 0.35rem;
}

.material-guide__list li:last-child {
  margin-bottom: 0;
}

.material-guide__notice {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #fff5eb;
  border: 1px solid #fcd9c0;
  color: #92400e;
}

.material-guide__notice ul {
  margin: 0.6rem 0 0.6rem 1.25rem;
  padding: 0;
  color: #92400e;
  list-style: disc;
}

.material-guide__notice li {
  margin-bottom: 0.35rem;
}

.material-guide__notice li:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .material-guide__item {
    flex-direction: column;
  }

  .material-guide__icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

.modal__footer--center {
  justify-content: center;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #eef2ff;
  color: #6b7280;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #e0e7ff;
  color: #1e293b;
}

.progress {
  margin-bottom: 2rem;
}

.progress__track {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.progress__fill,
.progress-fill,
#progressFill {
  height: 100%;
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  width: 25%;
  transition: width 0.3s ease;
  border-radius: inherit;
}

.progress__steps {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 0.75rem;
}

.progress__step,
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 70px;
}

.progress__step-number,
.progress-step .step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.progress__step--active .progress__step-number,
.progress-step--active .progress__step-number,
.progress-step--active .step-number {
  background: #00d4aa;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 212, 170, 0.25);
}

.progress__step--completed .progress__step-number,
.progress-step--completed .progress__step-number,
.progress-step--completed .step-number {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.progress__step-label,
.progress-step .step-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
}

.step-time {
  display: block;
  font-size: 0.65rem;
  color: #9ca3af;
  margin-top: 0.15rem;
  font-weight: 400;
}

.progress__step--active .step-time,
.progress-step--active .step-time {
  color: #00d4aa;
  font-weight: 500;
}

.form-save-resume {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.btn-link {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
}

.btn-link:hover {
  color: #00d4aa;
}

.btn-link--secondary {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.form-step {
  display: none;
  animation: fadeInUp 0.3s ease;
}

.form-step--active {
  display: block;
}

.form-step-title {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.form-step-subtitle {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1.5rem;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 0.5rem;
}

.form-input,
textarea.form-input {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.form-input:focus,
textarea.form-input:focus {
  outline: none;
  border-color: #00d4aa;
  box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.15);
}

.form-help,
.field-help {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
  line-height: 1.5;
}

.link-inline {
  color: #00d4aa;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.link-inline:hover {
  color: #00b894;
}

.optional {
  color: #9ca3af;
  font-weight: 400;
  font-size: 0.85rem;
}

.material-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.material-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-height: 120px;
}

.material-option:hover {
  border-color: #00d4aa;
  background: #ecfdf5;
}

.material-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.material-option.selected {
  border-color: #00d4aa;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 212, 170, 0.2) 100%);
  color: #035f4c;
}

.material-icon {
  font-size: 1.75rem;
}

.material-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
}

.material-desc {
  font-size: 0.8rem;
  color: #6b7280;
}

.purity-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.purity-option {
  position: relative;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.85rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s ease;
}

.purity-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.purity-option:hover {
  border-color: #00d4aa;
  background: #f0fdfa;
}

.purity-option.selected {
  border-color: #00d4aa;
  background: rgba(0, 212, 170, 0.12);
  color: #035f4c;
}

.purity-mark {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  border-radius: 999px;
  color: #6b7280;
}

.purity-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.weight-accuracy-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.weight-accuracy-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weight-accuracy-option:hover {
  border-color: #00d4aa;
  background: #f0fdfa;
}

.weight-accuracy-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #00d4aa;
}

.weight-accuracy-option input[type="radio"]:checked + .weight-accuracy-label {
  font-weight: 600;
  color: #047857;
}

.weight-accuracy-label {
  font-size: 0.95rem;
  color: #374151;
  flex: 1;
}

.size-options,
.condition-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.size-option,
.condition-option {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.size-option:hover,
.condition-option:hover {
  border-color: #00d4aa;
  background: #ecfdf5;
}

.size-option input[type="radio"],
.condition-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-option.selected,
.condition-option.selected {
  border-color: #00d4aa;
  background: rgba(0, 212, 170, 0.12);
}

.size-info,
.condition-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.size-name,
.condition-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
}

.size-range,
.condition-desc {
  font-size: 0.8rem;
  color: #6b7280;
}

.drag-drop-area,
.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 2.25rem 1.5rem;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.drag-drop-area:hover,
.upload-area:hover {
  border-color: #00d4aa;
  background: #ecfdf5;
}

.drag-drop-area.drag-over,
.upload-area.dragover {
  border-color: #00b894;
  background: rgba(0, 212, 170, 0.12);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: #6b7280;
}

.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.upload-subtitle,
.upload-text {
  font-size: 0.8rem;
  color: #6b7280;
}

.upload-link {
  color: #00b894;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.image-preview {
  margin-top: 1rem;
  display: none;
}

.image-preview.has-image,
.image-preview img {
  display: block;
  width: 100%;
}

.preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.preview-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  cursor: pointer;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

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

.form-checkbox__mark {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  margin-top: 2px;
}

.form-checkbox input[type="checkbox"]:checked + .form-checkbox__mark {
  background: #00d4aa;
  border-color: #00d4aa;
}

.form-checkbox input[type="checkbox"]:checked + .form-checkbox__mark::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-checkbox__text {
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.5;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
  .form-navigation {
    flex-direction: column-reverse;
  }

  .material-options,
  .purity-options,
  .size-options,
  .condition-options {
    grid-template-columns: 1fr;
  }
}

.quote-loader {
  text-align: center;
  padding: 2.5rem 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid #e5e7eb;
  border-top-color: #00d4aa;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.quote-result {
  text-align: center;
}

.quote-success__icon {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.quote-success__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.25rem;
}

.quote-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.quote-amount__currency {
  font-size: 1.5rem;
  color: #10b981;
  font-weight: 600;
}

.quote-amount__value {
  font-size: 3.5rem;
  font-weight: 700;
  color: #10b981;
}

.quote-confidence {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.quote-disclaimer {
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.quote-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.next-steps {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
}

.next-steps h4 {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem;
  border-left: 4px solid #00d4aa;
  background: #fff;
  border-radius: 10px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #00d4aa;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.step-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #4b5563;
}

.form-disclaimer {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .quote-amount {
    flex-direction: column;
    gap: 0;
  }

  .quote-amount__value {
    font-size: 3rem;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-help--condition {
  color: #047857;
  background: #ecfdf5;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.08);
}

.form-navigation #nextBtn {
  flex: 1;
  padding: 1.1rem 3rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 212, 170, 0.35);
}

.form-navigation #prevBtn {
  border-radius: 999px;
  padding: 1rem 2.25rem;
  font-weight: 600;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .form-navigation {
    align-items: center;
  }

  .form-navigation #prevBtn {
    max-width: 160px;
  }
}
