/* Premium Onboarding Enhancements */

/* ===== Service Provider Fields Animation ===== */
#serviceProviderFields {
  animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: top;
}

#serviceProviderFields.service-provider-hidden {
  animation: slideUp 0.25s ease-out forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 1000px;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    transform: translateY(-15px);
  }
}

.provider-divider {
  border-top: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
  padding: 12px 0;
  background-color: #F9FAFB;
  margin: 8px -1rem !important;
  padding-left: 1rem;
  padding-right: 1rem;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 16px 0;
  border-bottom: 1px solid #E5E7EB;
}

.location-header h6 {
  margin: 0;
  color: #1F2937;
}

#autoDetectBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 12px;
}

#autoDetectLoader {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #E5E7EB;
  border-top-color: #F97316;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Premium Profile Upload Component ===== */
.premium-upload-component {
  width: 100%;
}

.upload-area {
  border: 2px dashed #D1D5DB;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  background-color: #F9FAFB;
  transition: all 0.25s ease;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.upload-area:hover {
  border-color: #F97316;
  background-color: #FEF3E2;
}

.upload-area.drag-over {
  border-color: #F97316;
  background-color: #FFF3E0;
  box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.1);
  transform: scale(1.01);
}

.upload-icon {
  font-size: 40px;
  line-height: 1;
  display: block;
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-main {
  font-weight: 600;
  color: #1F2937;
  font-size: 14px;
}

.upload-sub {
  color: #6B7280;
  font-size: 13px;
}

.upload-link {
  color: #F97316;
  font-weight: 500;
  cursor: pointer;
}

.upload-hint {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* Preview Container */
.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.avatar-preview-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #F97316;
  background-size: cover;
  background-position: center;
  background-color: #F3F4F6;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
  animation: avatarPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes avatarPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.btn-remove-image {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #EF4444;
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-remove-image:hover {
  background-color: #DC2626;
  transform: scale(1.1);
}

.upload-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.upload-success {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10B981;
  font-size: 13px;
  font-weight: 500;
  animation: slideInRight 0.25s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Form Enhancements ===== */
.form-control:focus,
.form-select:focus {
  border-color: #F97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-control,
.form-select {
  transition: all 0.2s ease;
  border-color: #D1D5DB;
}

.form-control:hover,
.form-select:hover {
  border-color: #9CA3AF;
}

/* ===== Auth Page Animations ===== */
.auth-card {
  animation: fadeInUp 0.5s ease-out;
}

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

.auth-form-card .row > div {
  animation: staggerFadeIn 0.4s ease-out backwards;
}

.auth-form-card .row > div:nth-child(1) { animation-delay: 0.05s; }
.auth-form-card .row > div:nth-child(2) { animation-delay: 0.1s; }
.auth-form-card .row > div:nth-child(3) { animation-delay: 0.15s; }
.auth-form-card .row > div:nth-child(4) { animation-delay: 0.2s; }
.auth-form-card .row > div:nth-child(5) { animation-delay: 0.25s; }
.auth-form-card .row > div:nth-child(6) { animation-delay: 0.3s; }
.auth-form-card .row > div:nth-child(7) { animation-delay: 0.35s; }

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

/* ===== Trust Badges Enhancement ===== */
.trust-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.market-chip {
  display: inline-block;
  padding: 8px 12px;
  background-color: rgba(249, 115, 22, 0.1);
  color: #EA580C;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(249, 115, 22, 0.3);
  animation: fadeInLeft 0.4s ease-out backwards;
}

.market-chip:nth-child(1) { animation-delay: 0.15s; }
.market-chip:nth-child(2) { animation-delay: 0.2s; }
.market-chip:nth-child(3) { animation-delay: 0.25s; }

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

/* ===== Button Hover Effects ===== */
.btn-primary {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

/* ===== Success State ===== */
.upload-success::before {
  content: '✓';
  display: inline-block;
  font-weight: bold;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .upload-area {
    padding: 24px 16px;
    min-height: 140px;
  }

  .avatar-circle {
    width: 100px;
    height: 100px;
  }

  .upload-icon {
    font-size: 32px;
  }

  .auth-card {
    flex-direction: column;
  }

  .auth-side {
    border-bottom: 1px solid #E5E7EB;
  }
}
