/* =========================================================
   FUTURISTIC FORMS UI/UX (LIGHT MODE) - PREMIUM STANDARD LABELS
   ========================================================= */

/* Body & Layout Enhancements */
body {
  font-family: 'Cairo', sans-serif;
  background-color: #f8f9fa; /* Sleek light grey background */
}

/* The Main Form Container */
.form-card {
  background: rgba(255, 255, 255, 1);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  max-width: 800px;
  margin: 2rem auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05), 0 2px 5px rgba(0, 0, 0, 0.03);
}

.form-card h2 {
  color: #00a874;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

/* Premium Standard Labels and Inputs */
.form-label {
  font-weight: 700;
  color: #344767;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.custom-input,
.form-select {
  background-color: #f8f9fa;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 0.85rem 1.25rem !important;
  color: #495057;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.01) inset !important;
}

.custom-input:hover,
.form-select:hover {
  border-color: #cbd5e1 !important;
  background-color: #ffffff;
}

.custom-input:focus,
.form-select:focus {
  background-color: #ffffff;
  border-color: #00a874 !important;
  box-shadow: 0 0 0 4px rgba(0, 168, 116, 0.15) !important;
  outline: none;
}

/* Custom Input Groups (e.g. Serial Number with Button) */
.custom-input-group .custom-input {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 0 !important;
}

.custom-input-group .custom-btn-addon {
  border-radius: 12px 0 0 12px !important;
  border: 1px solid #e2e8f0;
  background-color: #f8f9fa;
  color: #64748b;
  border-right: 0;
  transition: all 0.3s ease;
}

.custom-input-group .custom-btn-addon:hover {
  background-color: #e2e8f0;
  color: #00a874;
}

/* The Animated Drag & Drop Image Area */
.drop-area {
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(248, 250, 252, 0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.drop-area::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0, 168, 116, 0.05), rgba(0, 168, 116, 0.0));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.drop-area:hover, .drop-area.dragover {
  border-color: #00a874;
  background: rgba(248, 250, 252, 1);
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 168, 116, 0.1);
}

.drop-area:hover::before, .drop-area.dragover::before {
  opacity: 1;
}

.drop-area .icon-text {
  position: relative;
  z-index: 1;
  font-family: "Cairo", sans-serif;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.drop-area .icon-text svg {
  width: 48px;
  height: 48px;
  color: #00a874;
  transition: transform 0.3s ease;
}

.drop-area:hover .icon-text svg {
  transform: translateY(-5px);
}

.image-preview {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 250px;
  margin-top: 1.5rem;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Stepper Redesign (RTL Fix) */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
  gap: 3rem;
  direction: ltr; /* Fix line direction issues, numbers remain right-to-left logical */
  flex-direction: row-reverse; /* Since step 1 is the first logically in RTL */
}

.step-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem; /* Exactly the size of the gap */
  height: 3px;
  background: #e2e8f0;
  z-index: 0;
}

.step-circle {
  position: relative;
  z-index: 1;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 800;
  font-size: 1.2rem;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-circle.active {
  background: #00a874;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 0 5px #d2f0e4; /* Solid color so the line doesn't show through */
}

/* Sleek Buttons */
.btn-success {
  background: linear-gradient(135deg, #00a874 0%, #00875c 100%);
  border: none;
  border-radius: 12px;
  padding: 0.85rem 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 6px 12px rgba(0, 168, 116, 0.25);
  transition: all 0.3s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 168, 116, 0.35);
  background: linear-gradient(135deg, #00ba80 0%, #009867 100%);
}

/* Step Transitions */
.step {
  animation: fadeInStep 0.4s ease forwards;
}

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

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

/* Fix disabled inputs */
.custom-input:disabled, .custom-input[readonly], .bg-light {
  background-color: #f1f5f9 !important;
  opacity: 1;
  color: #64748b;
  border-style: dashed !important;
  cursor: not-allowed;
}

/* iOS Style Switch */
.form-switch .form-check-input {
  width: 3.2rem !important;
  height: 1.8rem !important;
  background-color: #e9e9ea !important;
  border: 1px solid #e9e9ea !important;
  border-radius: 2rem !important;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  background-image: none !important;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05) !important;
}

.form-switch .form-check-input:focus {
  box-shadow: none !important;
  outline: none !important;
}

/* The Knob */
.form-switch .form-check-input::after {
  content: "";
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1);
  transition: right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: none !important;
}

.form-switch .form-check-input:checked {
  background-color: #00a874 !important;
  border-color: #00a874 !important;
}

.form-switch .form-check-input:checked::after {
  right: calc(100% - 1.6rem); /* Slide to left edge securely */
}

/* Make Select2 look like custom-input */
.select2-container--default .select2-selection--single {
  background-color: #f8f9fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  height: calc(3.5rem + 2px) !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 1.25rem !important;
  transition: all 0.3s ease;
}

.select2-container--default .select2-selection--single:focus {
  border-color: #00a874 !important;
  box-shadow: 0 0 0 4px rgba(0, 168, 116, 0.15) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: auto !important;
  left: 15px !important;
}

/* =========================================================
   MOBILE APP PREVIEW MOCKUP
   ========================================================= */

/* The outer phone frame */
.mobile-mockup {
  width: 100%;
  max-width: 375px; /* standard mobile width */
  height: 750px;
  background: #f8f9fa;
  border-radius: 40px;
  margin: 2rem auto;
  position: relative;
  box-shadow: 0 0 0 12px #ffffff, 0 0 0 14px #e2e8f0, 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* The Notch */
.mobile-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 25px;
  background: #ffffff;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 10;
  box-shadow: inset 0 -2px 5px rgba(0,0,0,0.05);
}

/* Status Bar Fake */
.mockup-status-bar {
  height: 40px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #344767;
  z-index: 5;
}

/* Inner App Content Scrollable */
.mockup-content {
  flex: 1;
  overflow-y: auto;
  background-color: #f8f9fa;
  position: relative;
}

/* Hide scrollbar for mockup */
.mockup-content::-webkit-scrollbar {
  display: none;
}
.mockup-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* App UI Elements */
.app-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.app-header i {
  font-size: 1.2rem;
  color: #344767;
}

.app-product-image {
  width: 100%;
  height: 300px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}

.app-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.app-product-info {
  padding: 1.5rem;
}

.app-product-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #344767;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.app-product-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: #00a874;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-product-price span {
  font-size: 0.9rem;
  font-weight: 700;
  color: #94a3b8;
}

.app-product-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Floating Action / Add to Cart */
.app-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(255,255,255,1) 60%, rgba(255,255,255,0));
  display: flex;
  justify-content: center;
}

.app-btn-cart {
  width: 100%;
  background: #00a874;
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(0, 168, 116, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.app-btn-cart i {
  font-size: 1.2rem;
}
