html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  /* Fallback background color to prevent white space */
  background-color: #1a1a1a;
  background: url("../Assets/background-event.jpg") no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  /* Prevent white space on mobile by using height instead of min-vh-100 */
  min-height: 100%;
  /* Prevent horizontal overflow */
  overflow-x: hidden;
  /* Ensure background covers full height */
  position: relative;
}

/* Full height container class to replace min-vh-100 */
.full-height {
  height: 100vh;
  min-height: 100vh;
}

/* Mobile-specific adjustments to prevent white space */
@media screen and (max-width: 768px) {
  body {
    /* Prevent mobile browser white space issues */
    min-height: 100vh;
    height: 100%;
  }
  
  .full-height {
    /* Use dvh (dynamic viewport height) if supported */
    height: 100dvh;
    min-height: 100vh;
    /* iOS Safari fix */
    min-height: -webkit-fill-available;
  }
}

/* Additional iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
  .full-height {
    min-height: -webkit-fill-available;
  }
}

/* Comprehensive mobile white space prevention */
@media screen and (max-width: 768px) {
  /* Force full height on all mobile browsers */
  html {
    height: 100%;
    height: -webkit-fill-available;
  }
  
  body {
    height: 100%;
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    /* Prevent bounce scrolling on iOS */
    overscroll-behavior: none;
    /* Ensure background attachment works on mobile */
    background-attachment: scroll;
  }
  
  .full-height {
    height: 100vh;
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    /* Add small additional height to prevent gaps */
    min-height: calc(100vh + 1px);
  }
}

/* Specific fix for very small screens */
@media screen and (max-width: 480px) {
  .full-height {
    min-height: calc(100vh + 5px);
  }
}

.bg-transparent {
	background-color: rgba(11, 11, 11, 0.72);
	border: 0;
}
.content-item {
  /* color:#313437;
  background-color:#343a40; */
  padding:50px 0;
  position: relative;
  z-index: 1;
}

.content-item p {
  color:#ffffff;
  line-height:1.5;
}

.content-item h2 {
  font-size:24px;
  font-weight:bold;
  margin-bottom:25px;
  line-height:1.5;
  padding-top:0;
  margin-top:0;
  color:inherit;
}

.content-item .intro {
  font-size:16px;
  max-width:500px;
  margin:0 auto 25px;
}

.content-item .intro p {
  margin-bottom:35px;
}

.content-item form {
  justify-content:center;
}

.content-item form .form-control {
  background:#eff1f4;
  border:none;
  border-radius:3px;
  box-shadow:none;
  outline:none;
  color:inherit;
  text-indent:9px;
  height:45px;
  margin-right:10px;
  min-width:250px;
}

.content-item form .btn {
  padding:16px 32px;
  border:none;
  background:none;
  box-shadow:none;
  text-shadow:none;
  opacity:0.9;
  text-transform:uppercase;
  font-weight:bold;
  font-size:13px;
  letter-spacing:0.4px;
  line-height:1;
}

.content-item form .btn:hover {
  opacity:1;
}

.content-item form .btn:active {
  transform:translateY(1px);
}

.content-item form .btn-primary {
  background-color:#055ada !important;
  color:#fff;
  outline:none !important;
}

h2 {
  color: #ffffff!important;
  text-align: center;
}

.result{
    color: #fff;
    text-align: center;
    font-size: 20px;
    margin-top: 20px;
}


/* Sticky Logo Styles */
.sticky-logo {
  position: fixed !important;
  /* z-index: 1050; */
  transition: all 0.3s ease;
}

.sticky-logo-left {
  left: 20px;
  top: 20px;
}

.sticky-logo-right {
  right: 20px;
  top: 20px;
}

.sticky-logo img {
  height: 120px;
  width: auto;
  max-width: 400px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Bottom Sticky Logo Styles */
.sticky-logo-bottom-left {
  position: fixed !important;
  left: 0px;
  bottom: 0px;
  /* z-index: 1040; Lower than top logos but above content */
  transition: all 0.3s ease;
}

.sticky-logo-bottom-right {
  position: fixed !important;
  right: 0px;
  bottom: 0px;
  /* z-index: 1040; Lower than top logos but above content */
  transition: all 0.3s ease;
}

/* Responsive adjustments for sticky logos */
@media (max-width: 768px) {
  .sticky-logo img {
    height: 80px;
    max-width: 300px;
  }
  
  .sticky-logo-left {
    left: 10px;
    top: 10px;
  }
  
  .sticky-logo-right {
    right: 10px;
    top: 10px;
  }
  
  .sticky-logo-bottom-left {
    left: 0px;
    bottom: 0px;
  }
  
  .sticky-logo-bottom-right {
    right: 0px;
    bottom: 0px;
  }
}

@media (max-width: 480px) {
  .sticky-logo img {
    height: 60px;
    max-width: 200px;
  }
  
  .sticky-logo-left {
    left: 5px;
    top: 5px;
  }
  
  .sticky-logo-right {
    right: 5px;
    top: 5px;
  }
  
  .sticky-logo-bottom-left {
    left: 0px;
    bottom: 0px;
  }
  
  .sticky-logo-bottom-right {
    right: 0px;
    bottom: 0px;
  }
}
    /* .row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    justify-content: space-between;
} */

.row {
    --bs-gutter-x: 0rem !important;
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(var(--bs-gutter-y) * -1);
    margin-right: calc(var(--bs-gutter-x) * -.5);
    margin-left: calc(var(--bs-gutter-x) * -.5);
}



/* Modal Styles */
.custom-modal {
    
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.301);
  backdrop-filter: blur(5px);
}

.custom-modal-content {
  max-height: calc(100vh - 100px) !important;
  overflow-y: auto;
  background-color: #fefefe;
  margin: 2% auto;
  padding: 0;
  border: none;
  border-radius: 20px;
  width: 95%;
  max-width: 900px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
  animation: slideIn 0.3s ease-out;
}

.rundown-modal-content {
  max-width: 900px;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.custom-modal-header {
  padding: 20px 25px 15px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  color: black !important;
  border-radius: 20px 20px 0 0;
}

.custom-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.custom-modal-close {
  background: rgb(151, 10, 10);
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: all-scroll;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.custom-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.custom-modal-body {
    
  padding: 25px;
  text-align: center;
}

.custom-modal-footer {
  padding: 15px 25px 25px;
  text-align: center;
  border-top: 1px solid #dee2e6;
}

/* Modal Button Styles */
.custom-modal-footer .btn {
  border-radius: 25px;
  padding: 10px 25px;
  margin: 5px;
  background: #002971;
  color: #ffffff;
  border: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.custom-modal-footer .btn:hover {
  background: #001a4d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 41, 113, 0.3);
}

.custom-modal-footer .btn:active {
  transform: translateY(0);
}

.download-btn {
  background: #002971 !important;
}

.close-btn {
  background: #6c757d !important;
}

.close-btn:hover {
  background: #5a6268 !important;
}

/* Responsive modal */
@media (max-width: 1200px) {
  .custom-modal-content {
    width: 90%;
    margin: 3% auto;
  }
}

@media (max-width: 768px) {
  .custom-modal-content {
    width: 95%;
    margin: 5% auto;
    max-height: calc(100vh - 80px) !important;
    border-radius: 15px;
  }
  
  .custom-modal-title {
    font-size: 1.2rem;
  }
  
  .custom-modal-header {
    padding: 15px 20px 10px;
  }
  
  .custom-modal-body {
    padding: 20px 15px;
  }
  
  .custom-modal-footer {
    padding: 10px 20px 20px;
  }
}

@media (max-width: 480px) {
  .custom-modal-content {
    width: 98%;
    margin: 2% auto;
    max-height: calc(100vh - 60px) !important;
    border-radius: 10px;
  }
  
  .custom-modal-title {
    font-size: 1.1rem;
  }
  
  .custom-modal-header {
    padding: 12px 15px 8px;
  }
  
  .custom-modal-body {
    padding: 15px 10px;
  }
  
  .custom-modal-footer {
    padding: 8px 15px 15px;
  }
  
  .custom-modal-footer .btn {
    font-size: 0.9rem;
    padding: 8px 20px !important;
    margin: 5px !important;
  }
}

@media (max-width: 320px) {
  .custom-modal-content {
    width: 100%;
    margin: 1% auto;
    border-radius: 0;
  }
}

/* Rundown Image Responsive Styles */
#rundownImageContainer {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

#rundownImageContainer img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-bottom: 15px;
  object-fit: contain;
}

/* Responsive image adjustments */
@media (max-width: 768px) {
  #rundownImageContainer img {
    border-radius: 10px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  #rundownImageContainer img {
    border-radius: 8px;
    margin-bottom: 8px;
  }
}

@media (max-width: 320px) {
  #rundownImageContainer img {
    border-radius: 5px;
    margin-bottom: 5px;
  }
}

/* Ensure main content doesn't overlap with fixed logos */
.content-item {
  position: relative;
  z-index: 1;
}

/* Add body padding to prevent logo overlap on very small screens */
@media (max-width: 320px) {
  body {
    padding-bottom: 70px; /* Space for bottom logos */
  }
  
  .sticky-logo-bottom-left,
  .sticky-logo-bottom-right {
    bottom: 0px;
  }
  
  .sticky-logo-bottom-left {
    left: 0px;
  }
  
  .sticky-logo-bottom-right {
    right: 0px;
  }
}

/* Prevent logos from interfering with scrollbars */
.sticky-logo-bottom-right {
  right: 0px; /* Extra space to avoid scrollbar */
}

@media (max-width: 768px) {
  .sticky-logo-bottom-right {
    right: 0px;
  }
}

@media (max-width: 480px) {
  .sticky-logo-bottom-right {
    right: 0px;
  }
}

@media (max-width: 320px) {
  .sticky-logo-bottom-right {
    right: 0px;
  }
}

/* Full height container class to replace min-vh-100 */
.full-height {
  height: 100vh;
  min-height: 100%;
}

/* Mobile-specific adjustments to prevent white space */
@media screen and (max-width: 768px) {
  .full-height {
    /* Use dvh (dynamic viewport height) if supported, fallback to 100vh */
    height: 100dvh;
    min-height: 100vh;
  }
}

/* Fallback for older browsers that don't support dvh */
@supports not (height: 100dvh) {
  @media screen and (max-width: 768px) {
    .full-height {
      height: 100vh;
      min-height: 100vh;
    }
  }
}

/* Sticky Logo Styles */
.sticky-logo {
  position: fixed !important;
  /* z-index: 1050; */
  transition: all 0.3s ease;

}

.sticky-logo-left {
  left: 20px;
  top: 20px;

}

.sticky-logo-right {
    /* height: 50px !important; */
  right: 20px;
  top: 20px;
}
.sticky-logo-right-1 {
    /* height: 50px !important; */
  right: 20px;
  top: 20px;
}
.sticky-logo img {
  height: 80px;
  width: auto;
  max-width: 600px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Ensure consistent sizing for all logo images */
.sticky-logo-right img {
  /* height: 50px !important; */
  width: auto;
  margin-left: 10px;

}

/* Consistent height for all three logos */
.logo-consistent-height {
  width: auto !important;
  margin-right: 5px !important;
  object-fit: contain !important; /* Maintain aspect ratio while fitting within height */
}

/* Individual logo sizing to achieve visual balance */
.logo-consistent-height[src*="logo-1.png"] {
  height: 34px !important; /* Use original height to maintain proportion */
}

.logo-consistent-height[src*="logo-2.png"] {
  height: 52px !important; /* Keep original height */
}

.logo-consistent-height[src*="logo-3.png"] {
  height: 52px !important; /* Keep original height */
}

/* Vertical centering container for right logos */
.logos-vertical-center {
  display: flex;
  align-items: center; /* Vertically center all logos */
  height: 80px; /* Match the main logo height */
  gap: 5px; /* Space between logos */
}

.sticky-logo-right-1 img {
  height: 34px !important;
  width: auto;
  margin-left: 10px;

}
.sticky-logo-right img:first-child {
  margin-left: 0;
}

/* Responsive adjustments for sticky logos */
@media (max-width: 768px) {
  .sticky-logo img {
    height: 60px;
    max-width: 300px;

  }
  
  .sticky-logo-right img {
    vertical-align: middle;
    height: 30px !important;
    margin-left: 8px;
  }
  
  /* Consistent height for all three logos on tablet */
  .logo-consistent-height {
    width: auto !important;
    margin-right: 5px !important;
    margin-left: 8px !important;
    object-fit: contain !important;
  }
  
  /* Individual logo sizing for tablet */
  .logo-consistent-height[src*="logo-1.png"] {
    height: 22px !important; /* Proportionally smaller for tablet */
  }

  .logo-consistent-height[src*="logo-2.png"] {
    height: 30px !important; /* Keep relative size */
  }

  .logo-consistent-height[src*="logo-3.png"] {
    height: 30px !important; /* Keep relative size */
  }
  
  /* Adjust vertical centering container for tablet */
  .logos-vertical-center {
    height: 60px; /* Match tablet main logo height */
  }
  
    .sticky-logo-right-1 img {
    vertical-align: middle;
    height: 22px !important;
    margin-left: 8px;
  }
  .sticky-logo-left {
    left: 10px;
    top: 10px;

  }
  
  .sticky-logo-right {
    right: 10px;
    top: 20px;
  }
}

/* Fix for specific width around 614px */
@media (max-width: 650px) and (min-width: 600px) {
  .logos-vertical-center {
    height: 60px !important; /* Ensure proper height */
    align-items: center !important; /* Force vertical centering */
    display: flex !important;
  }
  
  .sticky-logo img {
    height: 60px !important; /* Ensure main logo height consistency */
  }
}

@media (max-width: 480px) {
  .sticky-logo img {
    height: 40px;
    max-width: 299px;
       margin-top:10px;
    margin-left: 5px;

  }
  
  .sticky-logo-right img {
    height: 34px !important;
    margin-top:10px;
    margin-left: 5px;
  }
    .sticky-logo-bottom-left img {
    height: 40px;
    max-width: 299px;
       margin-top:10px;
    margin-left: 0px;

  }
  /* Consistent height for all three logos on mobile */
  .logo-consistent-height {
    width: auto !important;
    margin-right: 5px !important;
    margin-left: 5px !important;
    margin-top: 10px !important;
    object-fit: contain !important;
  }
  
  /* Individual logo sizing for mobile */
  .logo-consistent-height[src*="logo-1.png"] {
    height: 18px !important; /* Proportionally smaller for mobile */
  }

  .logo-consistent-height[src*="logo-2.png"] {
    height: 24px !important; /* Keep relative size */
  }

  .logo-consistent-height[src*="logo-3.png"] {
    height: 24px !important; /* Keep relative size */
  }
  
  /* Adjust vertical centering container for mobile */
  .logos-vertical-center {
    height: 40px; /* Match mobile main logo height */
    margin-top: 10px; /* Match mobile positioning */
  }
  
  .sticky-logo-left {
    left: 5px;
    top: 5px;

  }
  
  .sticky-logo-right {
    right: 5px;
    top: 5px;
  }
}

/* Carousel Enhancements */
.carousel {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.carousel-inner {
  border-radius: 10px;
}

.carousel-item {
  transition: transform 0.6s ease-in-out;
}

.carousel-item img {
  border-radius: 8px;
  max-height: 400px;
  object-fit: contain;
  width: 100%;
}

/* Enhanced Navigation Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 8%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 10px 10px 0;
  transition: all 0.3s ease;
}

.carousel-control-next {
  border-radius: 10px 0 0 10px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(0, 0, 0, 0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-size: 24px 24px;
  width: 24px;
  height: 24px;
}

/* Enhanced Indicators */
.carousel-indicators {
  margin-bottom: 1rem;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.carousel-indicators .active {
  background-color: #fff;
  transform: scale(1.2);
}

/* Touch/Swipe Enhancement */
.carousel-inner {
  touch-action: pan-y pinch-zoom;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 10%;
  }
  
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    background-size: 20px 20px;
    width: 20px;
    height: 20px;
  }
  
  .carousel-item img {
    max-height: 300px;
  }
}

/* Loading State */
.carousel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 1.1em;
}

.carousel-loading::before {
  content: '⟳';
  animation: spin 1s linear infinite;
  margin-right: 10px;
  font-size: 1.5em;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Clickable Image Enhancement */
.carousel-image-clickable {
  transition: all 0.3s ease;
  position: relative;
}

.carousel-image-clickable:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  filter: brightness(1.1);
}

.carousel-image-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.carousel-item:hover .carousel-image-overlay {
  opacity: 1;
}

/* Image Popup Modal Enhancements */
.modal-content.bg-transparent {
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(10px);
  z-index: 1056 !important; /* Higher than backdrop */
}

.modal-body img {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

/* Removed aggressive modal CSS - using clean Bootstrap-compatible solution below */

div[id^="imageModal-"] .modal-header,
div[id^="imageModal-"] .modal-body,
div[id^="imageModal-"] .modal-footer {
  z-index: 10001 !important;
  position: relative !important;
}

/* Override Bootstrap's modal z-index completely for image modals */
.modal.show[id^="imageModal-"] {
  z-index: 9998 !important;
}

.modal.fade[id^="imageModal-"] {
  z-index: 9998 !important;
}

/* Loading state for modal images */
.modal-body img[src=""] {
  background: rgba(255, 255, 255, 0.1);
  min-height: 200px;
}

/* Enhanced close button */
.btn-close-white {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.btn-close-white:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Mobile responsive modal */
@media (max-width: 768px) {
  .modal-lg {
    max-width: 95vw;
  }
  
  .modal-body img {
    max-height: 70vh;
  }
  
  .carousel-image-overlay {
    display: none; /* Hide overlay on mobile to avoid confusion */
  }
}

/* Smooth modal transition */
.modal.fade .modal-dialog {
  transition: transform 0.4s ease;
  transform: scale(0.8);
}

.modal.show .modal-dialog {
  transform: scale(1);
}

/* === CLEAN MODAL Z-INDEX SOLUTION === */
/* Simple, working approach without conflicts */

.image-popup-modal .modal-dialog {
  z-index: inherit;
  max-width: 90vw;
  max-height: 90vh;
}

.image-popup-modal .modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  overflow: hidden;
}

.image-popup-modal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
  padding: 15px 20px;
}

.image-popup-modal .modal-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.image-popup-modal .btn-close {
  filter: invert(1);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.image-popup-modal .btn-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.image-popup-modal .modal-body {
  padding: 20px;
  background: white;
}

.image-popup-modal .modal-popup-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.image-popup-modal .modal-popup-image:hover {
  transform: scale(1.02);
}

/* Clickable image cursor */
.carousel-image-clickable {
  cursor: pointer !important;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.carousel-image-clickable:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Loading state */
.modal-popup-image[src=""] {
  background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-popup-image[src=""]:before {
  content: "Loading...";
  color: #666;
  font-size: 1.2rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .image-popup-modal .modal-dialog {
    max-width: 95vw;
    margin: 10px auto;
  }
  
  .image-popup-modal .modal-popup-image {
    max-height: 60vh;
  }
  
  .image-popup-modal .modal-header {
    padding: 10px 15px;
  }
  
  .image-popup-modal .modal-title {
    font-size: 1rem;
  }
}

/* Animation improvements */
.image-popup-modal.fade .modal-dialog {
  transform: scale(0.8) translateY(-50px);
  transition: all 0.3s ease;
}

.image-popup-modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* ===== FINAL CLEAN MODAL SOLUTION ===== */
/* Override Bootstrap's default z-index values */

/* Step 1: Fix Bootstrap backdrop issues */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show {
  z-index: auto !important; /* Fix: Disable Bootstrap's z-index: 1050 from _backdrop.scss */
  width: 100% !important; /* Fix: Override Bootstrap's 100vw which causes positioning issues */
}

/* Step 2: Force modals to stay in front (z-index 1050) */
.modal,
.modal.fade,
.modal.show,
.image-popup-modal {
  /* z-index: 1050 !important; */
}

/* Step 3: Ensure modal content is visible */
.image-popup-modal .modal-content,
div[id^="imageModal-"] .modal-content {
  background: white;
  position: relative;
}

.image-popup-modal .modal-body img,
div[id^="imageModal-"] .modal-body img {
  /* display: block; */
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ===== SWIPEABLE MODAL STYLES ===== */

/* Modal navigation buttons */
.modal-nav-btn {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-nav-btn:hover {
  background: rgba(0, 0, 0, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Hide navigation buttons on small screens */
@media (max-width: 768px) {
  .modal-nav-btn {
    width: 35px !important;
    height: 35px !important;
    font-size: 12px;
  }
}

/* Modal image cursor states */
.modal-popup-image {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
}

.modal-popup-image:active {
  cursor: grabbing;
}

/* Swipe indicator */
.swipe-indicator {
  opacity: 0.7;
  animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Modal body positioning for navigation */
.modal-body {
  position: relative;
  overflow: hidden;
}

/* Image transition effects */
.modal-popup-image {
  transition: opacity 0.3s ease, transform 0.1s ease;
}

.modal-popup-image:hover {
  transform: scale(1.02);
}

/* Prevent text selection during swipe */
.modal-body * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
