/* Modal Styles for MISsimulation
 * Multiple design options that align with site branding
 * Primary color: #f45e43 (coral)
 * Secondary color: #2c3e50 (dark blue-gray)
 */

/* ============================================
   OPTION 1: Modern Gradient Header (Default)
   ============================================ */

.modal-content.modal-branded {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-branded .modal-header {
  background: linear-gradient(135deg, #f45e43 0%, #e54d32 100%);
  color: white;
  border: none;
  padding: 1.5rem 2rem;
}

.modal-branded .modal-header .modal-title {
  color: white;
  font-weight: 700;
}

.modal-branded .modal-header p {
  color: rgba(255, 255, 255, 0.9);
}

.modal-branded .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.modal-branded .modal-header .btn-close:hover {
  opacity: 1;
}

.modal-branded .modal-header .rounded-circle {
  background-color: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px);
}

.modal-branded .modal-body {
  padding: 2rem;
}

.modal-branded .modal-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 1.25rem 2rem;
}

.modal-branded .feature-highlight {
  background: linear-gradient(135deg, #fff5f3 0%, #fef8f7 100%);
  border-left: 4px solid #f45e43;
  padding: 1.25rem;
  border-radius: 8px;
}

.modal-branded .btn-primary {
  background: #f45e43;
  border-color: #f45e43;
  transition: all 0.3s ease;
}

.modal-branded .btn-primary:hover {
  background: #e54d32;
  border-color: #e54d32;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(244, 94, 67, 0.3);
}

/* ============================================
   OPTION 2: Clean Minimal with Accent
   ============================================ */

.modal-content.modal-minimal {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border-top: 4px solid #f45e43;
}

.modal-minimal .modal-header {
  background: white;
  border-bottom: 1px solid #f0f0f0;
  padding: 1.75rem 2rem;
}

.modal-minimal .modal-header .modal-title {
  color: #2c3e50;
  font-weight: 700;
}

.modal-minimal .modal-header .rounded-circle {
  background: linear-gradient(135deg, #f45e43 0%, #e54d32 100%) !important;
}

.modal-minimal .modal-body {
  padding: 2rem;
  background: white;
}

.modal-minimal .modal-footer {
  background: white;
  border-top: 1px solid #f0f0f0;
  padding: 1.5rem 2rem;
}

.modal-minimal .feature-highlight {
  background: #fafafa;
  border-left: 4px solid #f45e43;
  padding: 1.25rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.modal-minimal .feature-highlight:hover {
  background: #fff5f3;
  transform: translateX(4px);
}

/* ============================================
   OPTION 3: Card-Style with Shadow
   ============================================ */

.modal-content.modal-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-card .modal-header {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.modal-card .modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(244, 94, 67, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.modal-card .modal-header .modal-title {
  color: white;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.modal-card .modal-header p {
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

.modal-card .modal-header .btn-close {
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 1;
}

.modal-card .modal-header .rounded-circle {
  background: #f45e43 !important;
  position: relative;
  z-index: 1;
}

.modal-card .modal-body {
  padding: 2rem;
  background: white;
}

.modal-card .modal-footer {
  background: linear-gradient(to bottom, white 0%, #fafafa 100%);
  border-top: 1px solid #e9ecef;
  padding: 1.5rem 2rem;
}

.modal-card .feature-highlight {
  background: white;
  border: 2px solid #f0f0f0;
  border-left: 4px solid #f45e43;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================
   OPTION 4: Soft Glassmorphism
   ============================================ */

.modal-content.modal-glass {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-glass .modal-header {
  background: linear-gradient(135deg, rgba(244, 94, 67, 0.95) 0%, rgba(229, 77, 50, 0.95) 100%);
  backdrop-filter: blur(10px);
  color: white;
  border: none;
  padding: 1.75rem 2rem;
}

.modal-glass .modal-header .modal-title {
  color: white;
  font-weight: 700;
}

.modal-glass .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-glass .modal-header .rounded-circle {
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(10px);
}

.modal-glass .modal-body {
  background: rgba(255, 255, 255, 0.98);
  padding: 2rem;
}

.modal-glass .modal-footer {
  background: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem 2rem;
}

.modal-glass .feature-highlight {
  background: linear-gradient(135deg, rgba(255, 245, 243, 0.8) 0%, rgba(254, 248, 247, 0.8) 100%);
  backdrop-filter: blur(10px);
  border-left: 4px solid #f45e43;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(244, 94, 67, 0.1);
}

/* ============================================
   Shared Enhancements for All Styles
   ============================================ */

/* Smooth modal transitions */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1);
}

/* Icon styling */
.modal-content .text-primary {
  color: #f45e43 !important;
}

.modal-content .bg-primary {
  background-color: #f45e43 !important;
}

/* Button enhancements */
.modal-content .btn-outline-secondary {
  border-color: #e0e0e0;
  color: #5a6c7d;
  transition: all 0.3s ease;
}

.modal-content .btn-outline-secondary:hover {
  border-color: #f45e43;
  color: #f45e43;
  background: rgba(244, 94, 67, 0.05);
}

/* Success indicators */
.modal-content .text-success {
  color: #27ae60 !important;
}

/* Info sections */
.modal-content .bi-info-circle {
  color: #f45e43;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
  .modal-content.modal-branded,
  .modal-content.modal-minimal,
  .modal-content.modal-card,
  .modal-content.modal-glass {
    border-radius: 0;
    margin: 0;
    max-height: 100vh;
  }

  .modal-branded .modal-header,
  .modal-minimal .modal-header,
  .modal-card .modal-header,
  .modal-glass .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-branded .modal-body,
  .modal-minimal .modal-body,
  .modal-card .modal-body,
  .modal-glass .modal-body {
    padding: 1.25rem;
  }

  .modal-branded .modal-footer,
  .modal-minimal .modal-footer,
  .modal-card .modal-footer,
  .modal-glass .modal-footer {
    padding: 1rem 1.25rem;
  }

  .modal-branded .feature-highlight,
  .modal-minimal .feature-highlight,
  .modal-card .feature-highlight,
  .modal-glass .feature-highlight {
    padding: 1rem;
  }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

.modal-content:focus {
  outline: 3px solid rgba(244, 94, 67, 0.5);
  outline-offset: 2px;
}

.modal-header .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(244, 94, 67, 0.3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .modal.fade .modal-dialog {
    transition: none;
  }

  .modal-content .feature-highlight,
  .modal-content .btn-primary,
  .modal-content .btn-outline-secondary {
    transition: none;
  }
}
