/* =========================================================
   Layout
========================================================= */
.vitacare-ai-register {
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid: 2 columns */
.ai-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* Mobile */
@media (max-width: 768px) {
  .ai-upload-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Upload Box
========================================================= */
.ai-upload-box {
  width: 100%;
  max-width: 58%;              /* 👈 unified width */
  margin: 0 auto;
  text-align: center;
  transition: all 0.25s ease;
}

/* Tablet */
@media (max-width: 1024px) {
  .ai-upload-box {
    max-width: 70%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .ai-upload-box {
    max-width: 100%;
  }
}

/* Title */
.ai-upload-title {
  font-size: 18px;
  font-weight: 600;
  color: #444;
  text-align: initial;
}

.required {
  color: #e02b27;
  font-weight: bold;
}

/* =========================================================
   File Input UI
========================================================= */
.ai-upload-input-wrapper {
  position: relative;
}

/* Hide native input */
.ai-upload-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Label UI */
.ai-file-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 2px dashed #cfcfcf;
  border-radius: 10px;
  background: #fafafa;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ai-file-label:hover {
  border-color: #007bdb;
  background: #eef6ff;
  color: #007bdb;
}

.ai-file-label .icon {
  font-size: 18px;
  margin-right: 8px;
}

.ai-file-label .text {
  flex: 1;
  text-align: left;
}

html[lang="ar"] {
  .ai-file-label .icon {
    font-size: 18px;
    margin-left: 8px;
  }

  .ai-file-label .text {
    flex: 1;
    text-align: right;
  }
}

.ai-file-label .browse {
  background: #e0e0e0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
}

/* File name */
.ai-file-name {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

/* =========================================================
   Error state (UX win)
========================================================= */
.ai-upload-box.has-error .ai-file-label {
  border-color: #dc3545;
  background: #fff5f5;
}

.ai-upload-box.has-error {
  animation: shake 0.3s ease-in-out;
}

.field-error {
  color: #dc3545;
  font-size: 12px;
  margin-top: 6px;
  min-height: 14px;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

/* =========================================================
   Submit Button
========================================================= */
#ai-analyze-btn {
  display: block;
  width: 30%;
  min-width: 220px;
  margin: 40px auto 0;
  border-radius: 8px;
}

/* =========================================================
   Status Message
========================================================= */
#ai-status {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 6px;
  display: none;
  width: 45%;
  text-align: center;
  margin: 40px auto 0;
}

#ai-status.error {
  display: block;
  color: #721c24;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  width: 45%;
  text-align: center;
  margin: 40px auto 0;
}

#ai-status:not(.error) {
  display: block;
  color: #0c5460;
  background: #e8f7fb;
  border: 1px solid #bee5eb;
}

/* =========================================================
   Progress + Scanner
========================================================= */
.ai-progress-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

.progress-bar {
  width: 50%;                  /* 👈 requested */
  max-width: 480px;
  height: 10px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  display: none;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #007bdb, #00b4ff);
  transition: width 0.6s ease; /* smoother animation */
}

.progress-text {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
  display: none;
}

#processing-status {
  display: none;
  margin-top: 20px;
  text-align: center;
  padding: 10px;
  border: 1px dashed #007bdb40;
  border-radius: 6px;
}

#processing-status img {
  width: 32px;
  vertical-align: middle;
  margin-right: 8px;
}


/* ===== ADD START: Upload Mode Toggle ===== */
.ai-upload-toggle {
  text-align: center;
  margin: 20px 0;
  font-size: 14px;
}

.ai-upload-toggle input {
  margin-right: 6px;
}
/* ===== ADD END: Upload Mode Toggle ===== */


/* ===== ADD START: Single Upload Hint ===== */
.ai-upload-hint {
  max-width: 22rem;
  margin: 10px auto 16px;
  padding-left: 18px;
  font-size: 13px;
  color: #555;
  text-align:initial;
}

.ai-upload-title-step1 {
  margin-bottom: 3rem;
}

.ai-upload-hint li {
  margin-bottom: 4px;
}

.vitacare-ai-register .page-title {
  font-family: 'DM Sans 18pt', 'fontello', monospace;
  text-align: center;
  padding-top: 20px;
}


.vitacare-ai-register-container {
  max-width: 85%;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.note {
  font-size:20px;
}

/* ===== ADD END: Single Upload Hint ===== */
