/* place.css - Enhanced styling for medicine delivery order form */

/* General styles */
:root {
  --primary-color: #0d37f0;
  --primary-light: #fdfdfd;
  --primary-dark: #071308;
  --secondary-color: #ffeb3b;
  --secondary-light: #ffff72;
  --secondary-dark: #c8b900;
  --text-color: #212121;
  --light-text: #757575;
  --error-color: #d32f2f;
  --success-color: #388e3c;
  --warning-color: #f57c00;
  --background-color: #f5f5f5;
  --card-background: #ffffff;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --transition-time: 0.3s;
}



.card {
  background-color: var(--card-background);
  border-radius: 12px;
  box-shadow: 0 6px 18px var(--shadow-color);
  padding: 2rem;
  margin-bottom: 2rem;
}

h1 {
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.subtitle {
  text-align: center;
  color: var(--light-text);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Form elements */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color var(--transition-time);
}

input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23757575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.help-text {
  font-size: 0.8rem;
  color: var(--light-text);
  margin-top: 0.25rem;
}

.validation-error {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.validation-error::before {
  content: "⚠️";
  margin-right: 0.5rem;
}

/* Button styles */
.btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-time), transform var(--transition-time);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.btn i:last-child {
  margin-right: 0;
  margin-left: 0.5rem;
}

.btn-prev {
  background-color: #f5f5f5;
  color: var(--text-color);
}

.btn-prev:hover {
  background-color: #e0e0e0;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: rgba(46, 125, 50, 0.1);
}

/* Modern Progress Bar Styles - Alternative Design */
.progress-container {
  margin: 5.5rem 0;
  padding: 0 0.5rem;
}

.progress-bar {
  
  margin: 4mm;  
  position: relative;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 0;
  margin: 1.5rem 0 2.5rem;
}

.progress-fill {
  position: absolute;
  height: 100%;
  background-color: #4c2cbe;
  border-radius: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
}

/* Modern square indicator design */
.step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background-color: white;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  color: #757575;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transform: rotate(45deg);
}

.step span {
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10%;
  height: 100%;
}

.step.active {
  background-color: #4F46E5;
  color: #f3f3f7; 
  box-shadow: 0 3px 6px rgba(76, 175, 80, 0.3);
}

.step.complete {
  background-color: #4CAF50;
  color: white;
}

.step-label {
  position: absolute;
  top: 170%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.1rem;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  color: #757575;
  transition: color 0.3s ease;
}

.step.active .step-label {
  color: #4CAF50;
  font-weight: 600;
}

/* Alternative pill indicator design */
.progress-container.pill-style .progress-bar {
  height: 3px;
  border-radius: 1.5px;
}

.progress-container.pill-style .step {
  width: 26px;
  height: 8px;
  border-radius: 4px;
  transform: none;
  background-color: #e0e0e0;
}

.progress-container.pill-style .step span {
  display: none;
}

.progress-container.pill-style .step.active {
  background-color: #4CAF50;
  width: 32px;
}

.progress-container.pill-style .step.complete {
  background-color: #4CAF50;
  width: 26px;
}

.progress-container.pill-style .step-label {
  top: 190%;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .step {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  .progress-bar {
    margin: 1.25rem 0 2.25rem;
  }
  
  .progress-container.pill-style .step {
    width: 20px;
    height: 6px;
  }
  
  .progress-container.pill-style .step.active {
    width: 26px;
  }
}

/* For very small screens */
@media (max-width: 360px) {
  .step {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }
  
  .step-label {
    font-size: 0.65rem;
  }
  
  .progress-container.pill-style .step {
    width: 16px;
    height: 5px;
  }
  
  .progress-container.pill-style .step.active {
    width: 22px;
  }
}

/* Form steps */
.form-step {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.form-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Checkmark icon for completed steps */
.step.complete span::after {
  content: "✓";
  font-size: 10px;
}

.progress-container.pill-style .step.complete::after {
  content: "";
}

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

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* Location section */
.location-container {
  position: relative;
}

#map {
  height: 250px;
  border-radius: 10px;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.map-instructions {
  font-size: 0.85rem;
  color: var(--light-text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.map-instructions i {
  margin-right: 0.5rem;
  color: var(--warning-color);
}

.accuracy-bar {
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.accuracy-progress {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease, background-color 0.5s ease;
}

.location-feedback {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

.location-accuracy {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.accuracy-label {
  margin-right: 0.5rem;
  font-weight: 600;
}

/* Prescription upload section */
.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: border-color var(--transition-time), background-color var(--transition-time);
  background-color: rgba(0, 0, 0, 0.02);
}

.file-upload:hover {
  border-color: var(--primary-color);
  background-color: rgba(46, 125, 50, 0.05);
}

.file-upload-label {
  pointer-events: none;
}

.file-upload-label i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.file-upload-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-name {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
}

.separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--light-text);
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.separator span {
  padding: 0 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Upload options grid for prescription */
.upload-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.upload-option {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-time);
}

.upload-option:hover {
  border-color: var(--primary-color);
  background-color: rgba(46, 125, 50, 0.05);
}

.upload-option i {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.upload-option-title {
  font-size: 0.9rem;
  font-weight: 600;
}

/* File preview section */
.file-preview {
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.02);
}

.file-preview-icon {
  margin-right: 1rem;
  font-size: 2rem;
  color: var(--primary-color);
}

.file-preview-details {
  flex-grow: 1;
}

.file-preview-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.file-preview-meta {
  font-size: 0.8rem;
  color: var(--light-text);
}

.file-preview-remove {
  color: var(--error-color);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
}

/* Delivery charge and information */
.delivery-info {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary-color);
}

.delivery-distance,
.delivery-charge {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.delivery-distance i,
.delivery-charge i {
  margin-right: 0.75rem;
  color: var(--primary-color);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.delivery-note {
  display: flex;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--light-text);
  margin-top: 0.5rem;
}

.delivery-note i {
  margin-right: 0.5rem;
  margin-top: 0.1rem;
  color: var(--warning-color);
}

/* Delivery summary */
.delivery-summary,
.order-summary {
  background-color: rgba(46, 125, 50, 0.05);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(46, 125, 50, 0.2);
  position: relative;
}

.delivery-summary h3,
.order-summary h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
}

.delivery-summary h3 i,
.order-summary h3 i {
  margin-right: 0.75rem;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.summary-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-label {
  font-weight: 600;
  color: var(--text-color);
}

.summary-value {
  font-weight: 500;
}

/* Highlight delivery charge */
#summaryCharge,
#finalCharge {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Service area message */
.service-area {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.service-area.available {
  color: var(--success-color);
  font-weight: 500;
}

.service-area.unavailable {
  color: var(--error-color);
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card {
    padding: 1.5rem;
    border-radius: 10px;
  }
  
  h1 {
    font-size: 1.6rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  /* Make step circles smaller on mobile */
  .step {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-navigation button {
    width: 100%;
  }
  
  .upload-options {
    grid-template-columns: repeat(3, 1fr);
  }
  
  #map {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1.25rem;
  }
  
  /* Even smaller step circles for very small screens */
  .step {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  
  .step-label {
    font-size: 0.65rem;
  }
  
  .upload-options {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .upload-option {
    padding: 0.75rem 0.5rem;
  }
  
  .upload-option i {
    font-size: 1.5rem;
  }
  
  .upload-option-title {
    font-size: 0.8rem;
  }
}

/* Improved prescription preview section */
.prescription-preview {
  margin-top: 1rem;
  position: relative;
}

.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.preview-item {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3/4;
}

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

.preview-pdf {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #f8f9fa;
}

.preview-pdf i {
  font-size: 2rem;
  color: #e53935;
  margin-bottom: 0.5rem;
}

.preview-pdf span {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  padding: 0 0.5rem;
  word-break: break-all;
}

.preview-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--error-color);
  font-size: 0.8rem;
  padding: 0;
}

.preview-remove:hover {
  background-color: rgba(255, 255, 255, 1);
}

/* Highlighted delivery charge in summary */
.highlight-charge {
  background-color: rgba(255, 235, 59, 0.2);
  border-radius: 6px;
  padding: 0.75rem;
  border: 1px solid rgba(255, 235, 59, 0.4);
  margin-top: 1rem;
}

.highlight-charge-title {
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.highlight-charge-title i {
  color: var(--warning-color);
  margin-right: 0.5rem;
}

.highlight-charge-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Enhanced file upload area */
.upload-methods {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.upload-method {
  flex: 1;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-time);
}

.upload-method:hover {
  border-color: var(--primary-color);
  background-color: rgba(46, 125, 50, 0.05);
}

.upload-method i {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.upload-method-title {
  font-weight: 600;
  font-size: 0.85rem;
}









.mark-btn {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: #1e90ff;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}
.mark-btn:hover {
    background-color: #0078d7;
}
