/* Ajustes de responsividade (mobile-first) */

/* Base */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

body,
button,
input {
  -webkit-font-smoothing: antialiased;
}

button,
a,
input {
  touch-action: manipulation;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

/* =========================
   INDEX (home)
   ========================= */

/* Alguns blocos vêm com inline "visibility:hidden" (WOW/anim). Garantir visível no mobile/desktop */
.grid-stack-item.product-7.wow,
.grid-stack-item.product-9.wow {
  visibility: visible !important;
}

.grid-stack-item.product-7 {
  display: block !important;
  height: auto !important;
  min-height: clamp(280px, 39vw, 500px);
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  visibility: visible !important;
  width: 100% !important;
}

.grid-stack-item.product-7 .grid-stack-item-content {
  bottom: auto !important;
  display: block !important;
  height: auto !important;
  left: auto !important;
  max-width: 100%;
  min-height: clamp(280px, 39vw, 500px);
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  right: auto !important;
  top: auto !important;
  visibility: visible !important;
}

.grid-stack-item.product-7 .owl-carousel {
  background: #005b39;
  overflow: hidden;
  width: 100% !important;
}

.grid-stack-item.product-7 .owl-stage-outer {
  overflow: hidden !important;
  width: 100% !important;
}

.grid-stack-item.product-7 .owl-carousel,
.grid-stack-item.product-7 .owl-stage-outer,
.grid-stack-item.product-7 .owl-stage,
.grid-stack-item.product-7 .owl-item {
  opacity: 1 !important;
  visibility: visible !important;
}

.grid-stack-item.product-7 .item-slide picture,
.grid-stack-item.product-7 .item-slide img {
  display: block;
  width: 100%;
  height: auto;
}

.grid-stack-item.product-7 .item-slide img {
  object-fit: cover;
}

.grid-stack-item.product-7 .local-fallback-slider {
  position: relative;
}

.grid-stack-item.product-7 .local-fallback-slider > .item-slide {
  display: none;
  inset: 0;
  position: absolute;
}

.grid-stack-item.product-7 .local-fallback-slider > .item-slide.is-active {
  display: block;
}

.grid-stack-item.product-7 .local-slider-dots {
  bottom: 8px;
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  z-index: 4;
}

.grid-stack-item.product-7 .local-slider-dot {
  background: rgba(255, 255, 255, .75);
  border: 0;
  border-radius: 999px;
  height: 9px;
  min-height: 9px;
  padding: 0;
  width: 9px;
}

.grid-stack-item.product-7 .local-slider-dot.is-active {
  background: #00532e;
}

/* Modal do popup: evita estourar em telas pequenas */
.cnt-modal {
  width: min(660px, calc(100vw - 24px)) !important;
  margin: 20px auto !important;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

/* Grid de planos: 3 col no desktop, 2 no tablet, 1 no mobile */
#eventList .grid-stack {
  width: 100% !important;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 12px;
}

.grid-stack-item.product-9[data-product="75_9"] {
  order: 2 !important;
}

.grid-stack-item.product-9[data-product="74_9"] {
  order: 3 !important;
}

.grid-stack-item.product-9[data-product="76_9"] {
  order: 4 !important;
}

/* Remove regras antigas de float/width quando estamos usando grid */
.grid-stack-item.product-9 {
  float: none !important;
  width: auto !important;
}

.card.card-home.local-plan-card,
.card-home.myActiveUpcoming-listItem.local-plan-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}

.card.card-home.local-plan-card .card-image,
.card-home.myActiveUpcoming-listItem.local-plan-card .card-image {
  aspect-ratio: 1.42 / 1 !important;
  height: auto !important;
  min-height: 0 !important;
}

.card.card-home.local-plan-card .card-image picture,
.card.card-home.local-plan-card .card-image a,
.card-home.myActiveUpcoming-listItem.local-plan-card .card-image picture,
.card-home.myActiveUpcoming-listItem.local-plan-card .card-image a {
  display: block !important;
  height: 100% !important;
  width: 100% !important;
}

.card.card-home.local-plan-card .card-image img.local-plan-image,
.card-home.myActiveUpcoming-listItem.local-plan-card .card-image img.local-plan-image {
  transform: scale(.86) !important;
}

.card.card-home.local-plan-card .card-content,
.card-home.myActiveUpcoming-listItem.local-plan-card .card-content {
  min-height: 94px !important;
}

.card.card-home.local-plan-card .card-action,
.card-home.myActiveUpcoming-listItem.local-plan-card .card-action {
  z-index: 2 !important;
}

@media (max-width: 992px) {
  #eventList .grid-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  body {
    background-attachment: scroll !important;
  }

  .grid-stack-item.product-7 {
    grid-column: 1 / -1 !important;
    height: auto !important;
    margin: 0 0 16px !important;
    min-height: 210px !important;
  }

  .grid-stack-item.product-7 .grid-stack-item-content {
    height: auto !important;
    margin-bottom: 0 !important;
    min-height: 210px !important;
  }

  .grid-stack-item.product-7 .owl-carousel {
    border-radius: 0;
    height: 210px !important;
    min-height: 210px !important;
  }

  .grid-stack-item.product-7 .owl-stage-outer,
  .grid-stack-item.product-7 .owl-stage,
  .grid-stack-item.product-7 .owl-item,
  .grid-stack-item.product-7 .item-slide,
  .grid-stack-item.product-7 .item-slide strong,
  .grid-stack-item.product-7 .item-slide a,
  .grid-stack-item.product-7 .item-slide picture {
    display: block !important;
    height: 210px !important;
    width: 100% !important;
  }

  .grid-stack-item.product-7 .item-slide img {
    height: 210px !important;
    object-fit: cover !important;
    object-position: center center !important;
    width: 100% !important;
  }

  .grid-stack-item.product-7 .owl-nav {
    display: none !important;
  }

  .grid-stack-item.product-7 .owl-dots {
    bottom: 6px;
    left: 0;
    position: absolute;
    right: 0;
    z-index: 3;
  }

  #eventList .grid-stack {
    grid-template-columns: 1fr !important;
    row-gap: 18px !important;
    padding-inline: 10px !important;
  }

  .card.card-home.local-plan-card .card-image,
  .card-home.myActiveUpcoming-listItem.local-plan-card .card-image {
    aspect-ratio: 1.46 / 1 !important;
  }

  .card.card-home.local-plan-card .card-content,
  .card-home.myActiveUpcoming-listItem.local-plan-card .card-content {
    min-height: 88px !important;
    padding: 20px 22px !important;
  }

  .card.card-home.local-plan-card .card-title,
  .card-home.myActiveUpcoming-listItem.local-plan-card .card-title {
    font-size: 22px !important;
    line-height: 1.15 !important;
  }

  .card.card-home.local-plan-card .card-action,
  .card-home.myActiveUpcoming-listItem.local-plan-card .card-action {
    right: 16px !important;
  }
}

@media (max-width: 380px) {
  .grid-stack-item.product-7 .owl-carousel,
  .grid-stack-item.product-7 .owl-stage-outer,
  .grid-stack-item.product-7 .owl-stage,
  .grid-stack-item.product-7 .owl-item,
  .grid-stack-item.product-7 .item-slide,
  .grid-stack-item.product-7 .item-slide strong,
  .grid-stack-item.product-7 .item-slide a,
  .grid-stack-item.product-7 .item-slide picture,
  .grid-stack-item.product-7 .item-slide img {
    height: 190px !important;
    min-height: 190px !important;
  }

  .card.card-home.local-plan-card .card-image,
  .card-home.myActiveUpcoming-listItem.local-plan-card .card-image {
    aspect-ratio: 1.35 / 1 !important;
  }
}

/* Botão flutuante do chat: não ficar “voando” alto no mobile */
@media (max-width: 620px) {
  .embeddedMessagingConversationButtonWrapper .embeddedMessagingConversationButton {
    bottom: 16px !important;
    right: 16px !important;
    width: 56px !important;
    height: 56px !important;
  }
}

/* =========================
   PIX QR CODE (real via API)
   ========================= */

.pix-qr-wrap {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
}

.pix-qr-loading {
  align-items: center;
  color: #555;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 8px;
  padding: 16px;
}

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

.pix-spin {
  animation: psl-spin 1s linear infinite;
  display: inline-block;
  font-size: 32px !important;
}

.pix-qr-error {
  align-items: center;
  color: #b91c1c;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 6px;
  padding: 12px;
  text-align: center;
}

#pixQrImg.qr {
  border: 4px solid #fff;
  border-radius: 8px;
  display: block;
  height: auto;
  max-width: 200px;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* =========================
   SLIDER CUSTOMIZADO (psl)
   Substitui o Owl Carousel — funciona em mobile e desktop
   ========================= */

.psl-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #005b39;
  cursor: grab;
  user-select: none;
}
.psl-wrap:active { cursor: grabbing; }

.psl-track {
  display: flex;
  will-change: transform;
  transition: transform 0.5s ease;
}

.psl-item {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
}

.psl-item .item-slide {
  display: block;
  width: 100%;
}

.psl-item .item-slide strong,
.psl-item .item-slide strong > strong {
  display: block;
  width: 100%;
}

.psl-item .item-slide a {
  display: block;
  width: 100%;
}

.psl-item .item-slide picture {
  display: block;
  width: 100%;
}

.psl-item .item-slide img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  pointer-events: none;
}

/* Desktop: altura máxima para não ficar gigante em telas largas */
@media (min-width: 621px) {
  .psl-wrap {
    max-height: 500px;
    overflow: hidden;
  }
  .psl-item .item-slide img {
    max-height: 500px;
    object-fit: cover;
  }
}

.psl-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 4;
  pointer-events: none;
}

.psl-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s;
}

.psl-dot.psl-dot--active,
.psl-dot:hover {
  background: #00532e;
}

/* =========================
   CHECKOUT / TRANSACTION
   ========================= */

.checkout-page {
  width: min(100%, 1120px);
}

.details-page {
  width: min(100%, 1000px);
}

.data-card,
.top-card,
.total-card,
.add-card,
.transaction-details,
.final-product-card {
  max-width: 100%;
}

.input-wrap input,
.card-payment-form .input-wrap input {
  font-size: 16px;
}

.btn,
.assign-btn,
.pay-option,
.add-more,
.clear-btn,
.close-x {
  min-height: 44px;
}

.summary-table {
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

@media (max-width: 900px) {
  .assign-row {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .assign-control,
  .user-box,
  .plans,
  .voucher-box,
  .empty-line {
    grid-column: 2 !important;
  }

  .assign-control {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .transaction-grid {
    gap: 18px !important;
    grid-template-columns: 1fr !important;
  }

  .transaction-status {
    border-bottom: 1px solid #e2e7e4;
    padding-bottom: 18px;
  }
}

@media (max-width: 720px) {
  .checkout-page {
    padding: 8px 10px 24px !important;
  }

  .top-card {
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .count {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .data-card {
    padding: 24px 12px 28px !important;
  }

  .assign-row {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  .person-icon {
    display: none !important;
  }

  .assign-control,
  .user-box,
  .plans,
  .voucher-box,
  .empty-line {
    grid-column: auto !important;
  }

  .assign-control {
    grid-template-columns: 1fr !important;
  }

  .assign-btn {
    justify-self: stretch !important;
    width: 100% !important;
  }

  .plans {
    gap: 10px !important;
    margin: 18px 0 0 !important;
  }

  .plan-card {
    min-height: 72px !important;
    padding: 12px 10px !important;
  }

  .plan-card strong {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }

  .voucher-box {
    gap: 12px !important;
    margin-top: 24px !important;
    min-height: 0 !important;
    padding: 14px !important;
  }

  .voucher-icon {
    display: none !important;
  }

  .voucher-box .field {
    max-width: none !important;
    width: 100% !important;
  }

  .voucher-box .price {
    align-self: flex-end;
    font-size: 20px !important;
  }

  .add-card {
    padding: 22px 12px !important;
  }

  .add-more {
    height: auto !important;
    line-height: 1.3 !important;
    min-height: 48px !important;
    padding: 10px 12px !important;
  }

  .total-card {
    min-height: 0 !important;
    padding: 18px 14px !important;
  }

  .total-grid {
    gap: 14px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    max-width: none !important;
  }

  .total-labels,
  .total-values {
    gap: 18px !important;
  }

  .transaction-number {
    line-height: 1.4;
    text-align: left !important;
  }

  .footer-actions {
    gap: 10px !important;
    margin-top: 24px !important;
  }

  .modal-backdrop {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal {
    border-radius: 12px 12px 0 0;
    max-height: 92vh !important;
    width: 100% !important;
  }

  .modal-body {
    padding: 22px 16px !important;
  }

  .modal h2 {
    font-size: 20px !important;
    margin-bottom: 18px !important;
  }

  .term-line {
    gap: 10px !important;
  }

  .summary-table,
  .summary-table thead,
  .summary-table tbody,
  .summary-table tr,
  .summary-table th,
  .summary-table td {
    display: block;
  }

  .summary-table thead {
    display: none;
  }

  .summary-table tr {
    border: 1px solid #d8dfdc;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .summary-table td {
    border: 0 !important;
    display: grid;
    gap: 10px;
    grid-template-columns: 118px minmax(0, 1fr);
    padding: 7px 0 !important;
  }

  .summary-table td::before {
    color: #8a9490;
    content: attr(data-label);
    font-size: 11px;
  }

  .summary-table td:empty {
    display: none;
  }

  .pay-options {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .pay-option {
    min-width: 0 !important;
    width: 100% !important;
  }

  .transaction-title {
    font-size: 20px !important;
    padding: 14px 12px !important;
  }

  .transaction-grid {
    padding: 16px 12px !important;
  }

  .status-mark {
    height: 78px !important;
    width: 78px !important;
  }

  .status-mark .material-icons-outlined {
    font-size: 60px !important;
  }

  .meta-row {
    gap: 16px !important;
    margin-bottom: 20px !important;
  }

  .transaction-payment {
    padding: 16px 12px 18px !important;
  }

  .final-card-checkout {
    padding: 18px 14px !important;
  }

  .card-short-row {
    gap: 10px !important;
  }

  .pay-card-btn {
    margin-top: 18px !important;
    min-width: 106px !important;
    width: auto !important;
  }

  .card-error-popover {
    gap: 10px;
    left: 50% !important;
    padding: 12px 13px;
    transform: translateX(-50%);
  }

  .card-error-popover strong {
    font-size: 17px;
    line-height: 1.2;
    white-space: normal;
  }

  .final-qr,
  .qr.final-qr {
    height: min(72vw, 220px) !important;
    width: min(72vw, 220px) !important;
  }

  .pix-code {
    font-size: 11px !important;
    max-height: 130px;
    overflow: auto;
  }

  .final-product-card {
    gap: 18px !important;
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    padding: 22px 16px 16px !important;
  }

  .final-product-price {
    justify-self: start !important;
  }
}

@media (max-width: 420px) {
  .checkout-page {
    padding-inline: 8px !important;
  }

  .top-card {
    padding: 14px 12px !important;
  }

  .top-card h1 {
    font-size: 14px !important;
  }

  .field label {
    font-size: 10px !important;
  }

  .grand,
  .voucher-box .price,
  .final-product-price {
    font-size: 19px !important;
  }

  .summary-table td {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .pending-card-line {
    flex-direction: column;
  }
}

/* Telas bem pequenas (ex.: 320px) */
@media (max-width: 360px) {
  .transaction-title {
    font-size: 20px;
  }

  .total-grid {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
}
