/* Twise Integration styles - Modal, overlay and iframe functionality */

/* Modal section positioning */
.modal-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  pointer-events: none;
}

.modal-section .modal-overlay {
  pointer-events: all;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(255, 255, 255);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.modal-overlay::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  background-image: url('../media/modal_background_car.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 30px;
  z-index: 1;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  width: calc(100vw - 30px);
  height: calc(100vh - 30px);
  max-width: none;
  background-color: transparent;
  border: none;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  transform: scale(0.8) translateY(50px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.6s ease;
  z-index: 10;
}

.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0px;
}

/* Modal Close Button */
.modal-close-btn {
  position: fixed;
  bottom: 35px;
  left: 35px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.modal-close-btn:hover {
  transform: scale(1.1);
}

.modal-close-btn img {
  width: 40px;
  height: 40px;
}

/* Mobile responsive styles for modal */
@media (max-width: 768px) {
  .modal-overlay {
    align-items: center;
    justify-content: center;
  }

  .modal-content {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    transform: scale(0.8) translateY(0);
    opacity: 0;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
  }

  .modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  
  /* Mobile modal background - full screen */
  .modal-overlay::before {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
  }
  
  /* Hide close button on mobile */
  .modal-close-btn {
    display: none !important;
  }
}
