/* CSS Variables */
:root {
  --primary-color: #ff9933;
  --secondary-color: #138808;
  --accent-color: #ff9933;
  --text-color: #333;
  --light-gray: #f5f5f5;
  --border-color: #ddd;
  --error-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f9f9f9;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* Header Styles */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.logo {
  margin-bottom: 15px;
}

.header h1 {
  color: var(--accent-color);
  margin-bottom: 10px;
  font-size: 28px;
}

.header p {
  color: #666;
  font-size: 16px;
}

/* Form Card */
.form-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
}

/* Form Sections */
.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--accent-color);
  font-size: 20px;
}

.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  background-size: contain;
  background-repeat: no-repeat;
}

.icon-user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFA500'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

.icon-location {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFA500'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

.icon-upload {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFA500'%3E%3Cpath d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z'/%3E%3C/svg%3E");
}

.icon-otp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFA500'%3E%3Cpath d='M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6z'/%3E%3C/svg%3E");
}
/* Form Layout */
.form-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.form-group {
  flex: 1;
  min-width: 200px;
  margin: 0 10px 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.required::after {
  content: " *";
  color: var(--error-color);
}

.input-container {
  position: relative;
}

input,
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: white;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 0, 128, 0.1);
}

/* Error Styles */
.error {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

/* Year Picker */
.year-picker-container {
  position: relative;
}

.year-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  z-index: 10;
  display: none;
  margin-top: 5px;
}

.year-picker-dropdown.show {
  display: block;
}

.year-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  background: var(--light-gray);
}

.year-picker-nav {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
}

.year-picker-nav:hover {
  background: var(--border-color);
}

.year-picker-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.year-picker-years {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.year-option {
  padding: 8px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.year-option:hover {
  background: var(--light-gray);
}

.year-option.selected {
  background: var(--accent-color);
  color: white;
}

.year-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Image Upload */
.image-upload {
  text-align: center;
}

.image-preview {
  width: 150px;
  height: 150px;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--light-gray);
}

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

.upload-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.upload-btn:hover {
  background: #000066;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.checkbox-group input {
  width: auto;
  margin-right: 10px;
  margin-top: 5px;
}

/* Buttons */
.btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  transition: background-color 0.3s;
  display: block;
  width: 100%;
  margin-top: 20px;
}

.btn:hover {
  background: #e68900;
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: #0d7306;
}

/* OTP Section */
.otp-section {
  display: none;
  margin-top: 30px;
  padding: 20px;
  background: var(--light-gray);
  border-radius: var(--border-radius);
}

.otp-title {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.otp-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

.otp-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.otp-actions .btn {
  margin-top: 0;
  flex: 1;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: var(--border-radius);
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 350px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success-color);
}

.toast.error {
  background: var(--error-color);
}

.toast.info {
  background: var(--accent-color);
}

/* Loading Overlay */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-size: 18px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

/* Note Section */
.note {
  background: #fff9e6;
  border-left: 4px solid var(--warning-color);
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 40px 20px;
  background: #f8fff9;
  border-radius: 12px;
  border: 2px solid var(--success-color);
  margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .form-group {
    min-width: 100%;
  }

  .otp-actions {
    flex-direction: column;
  }

  .toast {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Dropdown Search Styles */
.select-with-search {
  position: relative;
}

.search-input-container {
  position: relative;
}

.search-input {
  padding-right: 40px;
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.dropdown-options.show {
  display: block;
}

.option-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.option-item:hover {
  background: var(--light-gray);
}

.option-item.selected {
  background: var(--accent-color);
  color: white;
}

.no-options {
  padding: 15px;
  text-align: center;
  color: #999;
}

/* Phone Validation Styles */
.phone-validation-valid {
  border-color: var(--success-color) !important;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="green" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 20px !important;
  padding-right: 40px !important;
}

.phone-validation-invalid {
  border-color: var(--error-color) !important;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="red" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>') !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 20px !important;
  padding-right: 40px !important;
}

.other-taste-container,
.other-upabasthi-container {
  background: var(--light-gray);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
}

.other-field-container {
  border-radius: 5px;
}
