.pkg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(10, 17, 24, 0.55);
}

.pkg-modal-overlay[hidden] {
  display: none;
}

.pkg-modal-dialog {
  position: relative;
  z-index: 10000;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
  padding: 24px;
}

.pkg-modal-close {
  position: absolute;
  z-index: 10001;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f1f3f5;
  color: #18202a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.pkg-modal-content {
  min-height: 220px;
}

.pkg-modal-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.pkg-modal-state-text {
  margin: 0;
  color: #394451;
  text-align: center;
}

.pkg-modal-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid #dae1e8;
  border-top-color: #0b7dc1;
  animation: pkg-modal-spin 0.8s linear infinite;
}

@keyframes pkg-modal-spin {
  to {
    transform: rotate(360deg);
  }
}

.pkg-modal-package {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pkg-modal-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

.pkg-modal-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 10px;
}

.pkg-modal-media img,
.pkg-modal-media video {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.pkg-modal-video {
  height: auto;
}

.pkg-modal-title {
  margin: 0;
  padding-right: 40px;
  font-size: 1.5rem;
  line-height: 1.25;
  color: #15202a;
}

.pkg-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
}

.pkg-modal-price,
.pkg-modal-duration {
  margin: 0;
}

.pkg-modal-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d7d3f;
}

.pkg-modal-duration {
  font-size: 0.95rem;
  color: #516274;
}

.pkg-modal-description {
  margin: 0;
  color: #2f3a46;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.pkg-modal-tags {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.pkg-modal-tag {
  border-radius: 999px;
  padding: 5px 11px;
  background: #e8f5fb;
  color: #0a648f;
  font-size: 0.85rem;
  line-height: 1;
}

.pkg-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pkg-modal-button {
  border: 0;
  border-radius: 9px;
  font-size: 0.95rem;
  line-height: 1;
  padding: 12px 16px;
  cursor: pointer;
}

.pkg-modal-button-primary {
  background: #0b7dc1;
  color: #ffffff;
}

.pkg-modal-button-secondary {
  background: #e8edf2;
  color: #1f2b36;
}

.pkg-modal-feedback {
  margin: 0;
  min-width: 72px;
  color: #0d7d3f;
  font-size: 0.9rem;
}

.pkg-modal-cart-count {
  margin: 0;
  color: #516274;
  font-size: 0.9rem;
}

body.pkg-modal-open {
  overflow: hidden;
}

#pacotes .card[data-package-id] {
  cursor: pointer;
}

@media (max-width: 768px) {
  .pkg-modal-dialog {
    padding: 16px;
    max-height: calc(100vh - 24px);
  }

  .pkg-modal-image {
    height: 220px;
  }
}

@media (min-width: 768px) {
  .pkg-modal-media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
