/* Tile Modal Styles */

.tile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in-out;
  overflow: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.tile-modal-overlay.closing {
  animation: fadeOut 0.3s ease-in-out;
}

.tile-modal-container {
  position: relative;
  background: linear-gradient(135deg, rgba(25, 42, 86, 0.95) 0%, rgba(15, 28, 58, 0.95) 100%);
  border: 2px solid #d4af37;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  width: 90%;
  max-width: 1000px;
  max-height: min(900px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close Button */
.tile-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(212, 175, 55, 0.2);
  border: 2px solid #d4af37;
  color: #d4af37;
  font-size: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1001;
  padding: 0;
  font-weight: bold;
}

.tile-modal-close:hover {
  background: rgba(212, 175, 55, 0.4);
  transform: scale(1.1);
}

.tile-modal-close:active {
  transform: scale(0.95);
}

/* Image Section */
.tile-modal-image-section {
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  flex-shrink: 0;
}

.tile-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content Section */
.tile-modal-details-row {
  display: flex;
  background: rgba(10, 20, 45, 0.5);
  min-height: 0;
  flex: 1;
}

/* Left Column: Details (Narrow) */
.tile-modal-details-left {
  width: 28%;
  padding: 20px;
  color: white;
  font-size: 14px;
  border-right: 2px solid rgba(212, 175, 55, 0.2);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tile-modal-details-left::-webkit-scrollbar {
  display: none;
}

/* Right Column: Ages and Recreation Boxes */
.tile-modal-details-right {
  flex: 1;
  padding: 20px;
  color: white;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tile-modal-details-right::-webkit-scrollbar {
  display: none;
}

/* Left Column Content Sections */
.tile-modal-detail-group {
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.tile-modal-detail-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.tile-modal-detail-label {
  font-weight: bold;
  color: #d4af37;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

.tile-modal-detail-value {
  color: white;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.tile-modal-detail-value a {
  color: #7fb3d5;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.tile-modal-detail-value a:hover {
  color: #a8d8ea;
  text-decoration: underline;
}

.tile-modal-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tile-modal-contact-row {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px;
  align-items: start;
}

.tile-modal-contact-key {
  color: rgba(212, 175, 55, 0.85);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.tile-modal-contact-value {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  min-width: 0;
}

/* Age Groups Display */
.tile-modal-age-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tile-modal-chip {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.tile-modal-age-badge {
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid #d4af37;
  color: #d4af37;
}

/* Box Section (Ages and Recreation) */
.tile-modal-box-section {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-modal-recreation-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile-modal-main-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tile-modal-recreation-box {
  color: #79d8ff;
  border: 1px solid rgba(121, 216, 255, 0.9);
  background: rgba(32, 119, 167, 0.26);
}

.tile-modal-recreation-box:hover {
  background: rgba(52, 146, 198, 0.36);
}

/* Right Column Content Sections */
.tile-modal-section {
  margin-bottom: 22px;
}

.tile-modal-section:last-child {
  margin-bottom: 0;
}

.tile-modal-section-title {
  font-size: 16px;
  font-weight: bold;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.tile-modal-description {
  font-size: 15px;
  line-height: 1.8;
  color: #e0e0e0;
}

/* Categories Display */
.tile-modal-category-list {
  margin-top: 8px;
}

.tile-modal-category-item {
  background: rgba(212, 175, 55, 0.1);
  border-left: 3px solid #d4af37;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 14px;
}

.tile-modal-category-item strong {
  color: #d4af37;
}

.tile-modal-category-item em {
  color: #b8b8b8;
  font-style: italic;
}

/* Nested Data Display */
.tile-modal-nested-items {
  margin-top: 10px;
  padding-left: 15px;
}

.tile-modal-nested-item {
  color: #c0c0c0;
  font-size: 13px;
  padding: 6px 0;
  padding-left: 15px;
  position: relative;
}

.tile-modal-nested-item:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #d4af37;
  font-weight: bold;
}

/* Call to Action Button */
.tile-modal-cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #d4af37 0%, #e8c547 100%);
  color: #192a56;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  border: none;
  margin-top: 12px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.tile-modal-cta-button:hover {
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}

.tile-modal-cta-button:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tile-modal-container {
    width: 95%;
    max-width: none;
    max-height: 90vh;
    border-radius: 12px;
  }

  .tile-modal-image-section {
    height: 200px;
  }

  .tile-modal-details-row {
    flex-direction: column;
    min-height: auto;
  }

  .tile-modal-details-left {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    max-height: 150px;
  }

  .tile-modal-details-right {
    flex: 1;
    min-height: auto;
    max-height: none;
  }

  .tile-modal-close {
    width: 45px;
    height: 45px;
    font-size: 28px;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .tile-modal-container {
    width: 98%;
    max-height: 95vh;
  }

  .tile-modal-image-section {
    height: 150px;
  }

  .tile-modal-details-left {
    max-height: 150px;
    padding: 15px;
  }

  .tile-modal-details-right {
    padding: 15px;
  }

  .tile-modal-detail-label {
    font-size: 10px;
  }

  .tile-modal-section-title {
    font-size: 14px;
  }

  .tile-modal-description {
    font-size: 13px;
  }
}
