/* ===================================
   ORDER DETAIL PAGE STYLES
   iMagin.K - UI/UX Design System
   Mobile First Approach
=================================== */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --accent-color: #fd7e14;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
}

/* ===================================
   ANIMATIONS KEYFRAMES
=================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(253, 126, 20, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(253, 126, 20, 0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===================================
   GENERAL CARD ANIMATIONS
=================================== */

.card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.card.animate-in:nth-child(1) { animation-delay: 0.1s; }
.card.animate-in:nth-child(2) { animation-delay: 0.2s; }
.card.animate-in:nth-child(3) { animation-delay: 0.3s; }
.card.animate-in:nth-child(4) { animation-delay: 0.4s; }

/* ===================================
   TIMELINE CONTAINER STYLES
=================================== */

.timeline-container {
  position: relative;
  padding: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--light-color) 0%, 
    var(--secondary-color) 25%, 
    var(--success-color) 75%, 
    var(--success-color) 100%
  );
  transform: translateY(-50%);
  border-radius: 2px;
  z-index: 1;
}

/* Mobile Timeline Adjustments */
@media (max-width: 768px) {
  .timeline-container::before {
    display: none;
  }
  
  .timeline-container {
    padding: 1rem 0;
  }
  
  .timeline-step {
    margin-bottom: 2rem;
    position: relative;
  }
  
  .timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1rem;
    width: 2px;
    height: 1rem;
    background: var(--light-color);
    transform: translateX(-50%);
  }
  
  .timeline-step.completed:not(:last-child)::after {
    background: var(--success-color);
  }
  
  .timeline-step.current:not(:last-child)::after {
    background: var(--accent-color);
  }
}

/* ===================================
   TIMELINE STEP STYLES
=================================== */

.timeline-step {
  text-align: center;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-step:hover {
  transform: translateY(-2px);
}

.timeline-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.timeline-description {
  font-size: 0.875rem;
  margin-bottom: 0;
  transition: color 0.3s ease;
}

/* ===================================
   TIMELINE STATE STYLES
=================================== */

/* Completed State */
.timeline-step.completed .timeline-icon {
  background: var(--success-color);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.timeline-step.completed .timeline-title {
  color: var(--success-color);
  font-weight: 700;
}

.timeline-step.completed .timeline-description {
  color: var(--success-color);
}

/* Current State */
.timeline-step.current .timeline-icon {
  background: var(--accent-color);
  color: white;
  animation: pulse 2s infinite;
  box-shadow: 0 4px 20px rgba(253, 126, 20, 0.4);
}

.timeline-step.current .timeline-title {
  color: var(--accent-color);
  font-weight: 700;
}

.timeline-step.current .timeline-description {
  color: var(--accent-color);
  font-weight: 500;
}

/* Upcoming State */
.timeline-step.upcoming .timeline-icon {
  background: var(--light-color);
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.timeline-step.upcoming .timeline-title {
  color: var(--secondary-color);
}

.timeline-step.upcoming .timeline-description {
  color: var(--secondary-color);
}

/* ===================================
   QUOTE RESPONSE FORM STYLES
=================================== */

.card.border-primary {
  border: 2px solid var(--primary-color) !important;
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.card.border-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 1;
}

/* Form Check Enhancements */
.form-check {
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.form-check:hover {
  background-color: rgba(0, 123, 255, 0.05);
  border-color: rgba(0, 123, 255, 0.2);
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:checked ~ .form-check-label {
  font-weight: 700;
}

.form-check:has(.form-check-input:checked) {
  background-color: rgba(0, 123, 255, 0.08);
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.form-check-label {
  cursor: pointer;
  line-height: 1.5;
  transition: all 0.3s ease;
}

/* Textarea Enhancements */
.form-control {
  border: 2px solid var(--light-color);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

.form-control.required-field {
  border-color: var(--warning-color);
  background-color: rgba(255, 193, 7, 0.05);
}

/* Required Field Indicator */
.required-indicator {
  display: inline-block;
  color: var(--warning-color);
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 0.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.required-indicator.show {
  opacity: 1;
  transform: translateX(0);
  animation: slideInRight 0.4s ease;
}

/* Submit Button Enhancement */
.btn-primary.w-100 {
  padding: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary.w-100::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary.w-100:hover::before {
  left: 100%;
}

.btn-primary.w-100:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ===================================
   COMMUNICATION SECTION STYLES
=================================== */

.border-start.border-primary.border-4 {
  border-left: 4px solid var(--primary-color) !important;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(0, 123, 255, 0.02));
  border-radius: 0 8px 8px 0;
  position: relative;
}

.border-start.border-primary.border-4::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 30px;
  background: var(--primary-color);
  border-radius: 0 4px 4px 0;
}

/* ===================================
   STATUS BADGES ENHANCEMENT
=================================== */

.badge {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
}

.badge.bg-warning {
  background: linear-gradient(135deg, var(--warning-color), #e6ac00) !important;
  color: var(--dark-color) !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, var(--info-color), #138496) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, var(--success-color), #1e7e34) !important;
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3) !important;
}

/* ===================================
   FILE SECTION ENHANCEMENTS
=================================== */

.list-group-item-action {
  transition: all 0.3s ease;
  border-radius: 6px !important;
  margin-bottom: 0.5rem;
}

.list-group-item-action:hover {
  background-color: rgba(0, 123, 255, 0.08);
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===================================
   RESPONSIVE DESIGN
=================================== */

@media (max-width: 576px) {
  .timeline-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .timeline-title {
    font-size: 0.875rem;
  }
  
  .timeline-description {
    font-size: 0.75rem;
  }
  
  .form-check {
    padding: 0.75rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* ===================================
   UTILITY CLASSES
=================================== */

.text-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-custom {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.border-radius-custom {
  border-radius: 12px;
}