/* Custom SweetAlert2 Modal Styles */
.custom-swal-container {
  z-index: 9999;
}

   .custom-swal-popup {
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: none;
    max-height: 90vh;
    min-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: white;
  }

 .custom-swal-content {
   text-align: left;
   padding: 0;
   margin: 0;
   height: 70vh !important;
   max-height: 70vh !important;
   overflow-y: scroll !important;
   overflow-x: hidden;
   position: relative;
 }

/* Modal Content Wrapper */
 .modal-content-wrapper {
   padding: 30px;
   font-family: inherit;
   line-height: 1.6;
   color: #2c3e50;
 }

 .modal-content-wrapper h2 {
   color: #1a252f;
   font-size: 28px;
   font-weight: 700;
   margin-bottom: 10px;
   text-align: center;
 }

.modal-content-wrapper .last-updated {
  text-align: center;
  color: #7f8c8d;
  font-size: 14px;
  margin-bottom: 30px;
  font-style: italic;
}

.modal-content-wrapper section {
  margin-bottom: 25px;
}
.swal2-html-container section h2{
    text-align: left;
}
.swal2-html-container section p{
    text-align: left;
  }
  .swal2-html-container section ul, .swal2-html-container section ol{
    list-style: circle;
    text-align: left;
    margin-left: 25px;
  }

 .modal-content-wrapper h3 {
   color: #2c3e50;
   font-size: 20px;
   font-weight: 600;
   margin-bottom: 15px;
   border-bottom: 2px solid #3498db;
   padding-bottom: 8px;
 }

 .modal-content-wrapper h4 {
   color: #34495e;
   font-size: 16px;
   font-weight: 600;
   margin: 20px 0 10px 0;
 }

 .modal-content-wrapper p {
   margin-bottom: 15px;
   color: #2c3e50;
   font-size: 15px;
   line-height: 1.7;
 }

.modal-content-wrapper ul {
  margin: 15px 0;
  padding-left: 25px;
}

 .modal-content-wrapper li {
   margin-bottom: 8px;
   color: #34495e;
   font-size: 14px;
   line-height: 1.6;
 }

/* SweetAlert2 Custom Close Button */
.swal2-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: #e74c3c;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swal2-close:hover {
  background: #c0392b;
  transform: scale(1.1);
}

 /* Scrollbar Styling */
 .custom-swal-content::-webkit-scrollbar {
   width: 10px;
 }

 .custom-swal-content::-webkit-scrollbar-track {
   background: #f8f9fa;
   border-radius: 5px;
   margin: 5px 0;
 }

 .custom-swal-content::-webkit-scrollbar-thumb {
   background: #3498db;
   border-radius: 5px;
   border: 2px solid #f8f9fa;
 }

 .custom-swal-content::-webkit-scrollbar-thumb:hover {
   background: #2980b9;
 }

 /* Firefox scrollbar */
 .custom-swal-content {
   scrollbar-width: thin;
   scrollbar-color: #3498db #f8f9fa;
 }

       /* Responsive Design */
   @media (max-width: 768px) {
     .custom-swal-popup {
       width: 95% !important;
       margin: 10px;
       max-height: 85vh;
       min-height: 65vh;
       background: white;
     }
    
    .custom-swal-content {
      max-height: 65vh !important;
      height: 65vh !important;
      overflow-y: scroll !important;
    }
   
   .modal-content-wrapper {
     padding: 20px;
   }
   
   .modal-content-wrapper h2 {
     font-size: 24px;
   }
   
   .modal-content-wrapper h3 {
     font-size: 18px;
   }
   
   .modal-content-wrapper p,
   .modal-content-wrapper li {
     font-size: 14px;
   }
 }

       @media (max-width: 480px) {
     .custom-swal-popup {
       width: 98% !important;
       margin: 5px;
       max-height: 90vh;
       min-height: 70vh;
       background: white;
     }
    
    .custom-swal-content {
      max-height: 70vh !important;
      height: 70vh !important;
      overflow-y: scroll !important;
    }
   
   .modal-content-wrapper {
     padding: 15px;
   }
   
   .modal-content-wrapper h2 {
     font-size: 20px;
   }
   
   .modal-content-wrapper h3 {
     font-size: 16px;
   }
   
   .modal-content-wrapper p,
   .modal-content-wrapper li {
     font-size: 13px;
   }
   
   .swal2-close {
     top: 10px;
     right: 10px;
     width: 25px;
     height: 25px;
     font-size: 14px;
   }
 }

/* Animation for modal appearance */
.custom-swal-popup {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

 /* Focus styles for accessibility */
 .swal2-close:focus {
   outline: 2px solid #3498db;
   outline-offset: 2px;
 }

 /* Additional improvements for better scrolling */
 .custom-swal-content {
   -webkit-overflow-scrolling: touch;
   scroll-behavior: smooth;
   overflow-y: scroll !important;
   height: 70vh !important;
   max-height: 70vh !important;
 }

 /* Force scrolling to work */
 .swal2-html-container {
   overflow: visible !important;
   max-height: none !important;
   background: white;
 }

 .swal2-popup {
   overflow: visible !important;
   background: white;
 }

 /* Ensure modal background covers all content */
 .swal2-container {
   background: rgba(0, 0, 0, 0.4);
   z-index: 99999;
 }

 /* Better text contrast */
 .modal-content-wrapper .last-updated {
   text-align: center;
   color: #6c757d;
   font-size: 14px;
   margin-bottom: 30px;
   font-style: italic;
   font-weight: 500;
 }

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .modal-content-wrapper {
    color: #ecf0f1;
  }
  
  .modal-content-wrapper h2,
  .modal-content-wrapper h3,
  .modal-content-wrapper h4 {
    color: #bdc3c7;
  }
  
  .modal-content-wrapper p,
  .modal-content-wrapper li {
    color: #bdc3c7;
  }
  
  .custom-swal-popup {
    background: #2c3e50;
  }
  
  .loading-spinner {
    border-color: #34495e;
    border-top-color: #3498db;
  }
}
