/* Property Show Page Styles */
.features {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 1.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.features .title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #2d3748;
  letter-spacing: 0.01em;
}

.features ul,
.features ol {
  padding-left: 1.2em;
  margin-bottom: 0;
}

.features li {
  margin-bottom: 0.5rem;
  padding-left: 0.2em;
  position: relative;
  color: #495057;
  font-size: 1rem;
}

.features strong,
.features b {
  color: #212529;
  font-weight: 600;
}

.features p {
  margin-bottom: 0.5rem;
}

/* Image viewer styles */
.image-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Loading state for main image */
.main-image-loading {
  position: relative;
}

.main-image-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 0.375rem;
}

.main-image-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 6;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.view-fullscreen-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
  transform: none !important;
  scale: 1 !important;
}

.view-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: none !important;
  scale: 1 !important;
}

.view-fullscreen-btn:active {
  transform: none !important;
  scale: 1 !important;
}

.view-fullscreen-btn:focus {
  transform: none !important;
  scale: 1 !important;
}

.view-fullscreen-btn svg {
  width: 20px;
  height: 20px;
}

/* Fullscreen image viewer styles */
.fullscreen-image-viewer {
  width: 100vw !important;
  height: calc(100vh - 80px) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - 80px) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  box-sizing: border-box !important;
  position: relative;
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
}

.fullscreen-image-viewer img {
  max-width: 100vw !important;
  max-height: calc(100vh - 60px) !important;
  width: auto !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  margin-top: 20px !important;
  margin-bottom: 20px !important;
}

.fullscreen-image-viewer img.loading {
  opacity: 0.5;
  transform: scale(0.95);
}

.fullscreen-image-viewer img.loaded {
  opacity: 1;
  transform: scale(1);
}

.image-gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 0 !important;
  margin-bottom: 40px !important;
  padding-bottom: 10px !important;
}

.gallery-nav-btn {
  background: rgba(0, 123, 255, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  font-size: 18px;
  backdrop-filter: blur(10px);
}

.gallery-nav-btn:hover {
  background: rgba(0, 86, 179, 0.95);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.gallery-nav-btn:active {
  transform: scale(0.95);
}

.gallery-nav-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.image-counter {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

/* SweetAlert2 custom styles for image gallery */
.swal2-image-gallery {
  background: transparent !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

/* Disable all SweetAlert2 animations */
.swal2-popup {
  animation: none !important;
  transform: none !important;
  transition: none !important;
  scale: 1 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.swal2-backdrop {
  animation: none !important;
  transition: none !important;
}

.swal2-show {
  animation: none !important;
  transform: none !important;
  scale: 1 !important;
}

.swal2-hide {
  animation: none !important;
  transform: none !important;
  scale: 1 !important;
}

/* Override any keyframe animations */
@keyframes swal2-show {
  0% { transform: none !important; }
  100% { transform: none !important; }
}

@keyframes swal2-hide {
  0% { transform: none !important; }
  100% { transform: none !important; }
}

/* Hide scrollbar when modal is open */
body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.modal-open {
  overflow: hidden !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Additional scrollbar hiding for webkit browsers */
body.modal-open::-webkit-scrollbar {
  display: none !important;
}

/* Hide scrollbar for Firefox */
body.modal-open {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.swal2-image-gallery .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  box-sizing: border-box !important;
  justify-content: flex-start;
  align-items: center;
}

.swal2-close-button {
  color: white !important;
  font-size: 28px !important;
  opacity: 0.8 !important;
  transition: opacity 0.3s ease !important;
}

.swal2-close-button:hover {
  opacity: 1 !important;
}

.swal2-image-gallery .swal2-close {
  position: absolute !important;
  top: 15px !important;
  right: 15px !important;
  z-index: 1000 !important;
}

/* Responsive styles for fullscreen image viewer */
@media (max-width: 768px) {
  .swal2-image-gallery {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .fullscreen-image-viewer {
    width: 100vw !important;
    height: calc(100vh - 80px) !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  .fullscreen-image-viewer img {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
  }

  .image-gallery-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 25px;
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .swal2-image-gallery {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .fullscreen-image-viewer {
    width: 100vw !important;
    height: calc(100vh - 80px) !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 80px) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin: 0 !important;
  }

  .fullscreen-image-viewer img {
    max-width: 100vw !important;
    max-height: calc(100vh - 80px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }

  .image-gallery-controls {
    bottom: 5px;
    padding: 6px 12px;
    margin-bottom: 0;
  }

  .gallery-nav-btn {
    min-width: 36px !important;
    min-height: 36px !important;
  }

  .image-counter {
    font-size: 12px !important;
  }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .property-title-price {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .property-title-price h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem;
  }

  .property-title-price .h4 {
    font-size: 1.25rem !important;
  }

  .property-details-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .property-info-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .property-info-row span {
    margin-right: 0 !important;
    margin-bottom: 0.5rem;
  }

  .contact-form-sidebar {
    margin-top: 2rem;
    margin-left: 0 !important;
  }

  .features {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .features .title {
    font-size: 1.1rem;
  }

  .view-fullscreen-btn {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
  }

  .view-fullscreen-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 576px) {
  .property-details-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .image-gallery-main {
    margin-bottom: 1rem;
  }

  .image-gallery-thumbs {
    max-height: 200px !important;
  }

  .image-gallery-thumbs .d-flex {
    flex-direction: row !important;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .image-gallery-thumbs .image-container {
    flex-shrink: 0;
    width: 80px;
  }

  .image-gallery-thumbs img {
    height: 80px !important;
    width: 80px !important;
  }

  .property-title-price h1 {
    font-size: 1.25rem !important;
  }

  .property-title-price .h4 {
    font-size: 1.1rem !important;
  }

  .property-info-row .d-flex {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .property-info-row span {
    font-size: 0.9rem;
  }

  .features {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .features .title {
    font-size: 1rem;
  }

  .view-fullscreen-btn {
    width: 35px;
    height: 35px;
    top: 8px;
    right: 8px;
  }

  .view-fullscreen-btn svg {
    width: 16px;
    height: 16px;
  }

  .card-body {
    padding: 1rem;
  }

  .form-control, .form-label {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .property-details-grid .col-6 {
    padding: 0.25rem;
  }

  .property-details-grid .border {
    padding: 0.75rem 0.5rem !important;
  }

  .property-details-grid .fw-bold {
    font-size: 1rem !important;
  }

  .property-details-grid .small {
    font-size: 0.75rem !important;
  }

  .image-gallery-thumbs .image-container {
    width: 70px;
  }

  .image-gallery-thumbs img {
    height: 70px !important;
    width: 70px !important;
  }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
  .view-fullscreen-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .gallery-nav-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .btn {
    min-height: 44px;
  }

  .form-control, .form-select {
    min-height: 44px;
  }
}
