/* ================= CHECKOUT MODAL ================= */
.checkout-overlay{
  position:fixed;
  inset:0;

  display:none;

  /*background:rgba(0,0,0,0.45);*/
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter:blur(2px);

  align-items:center;
  justify-content:center;
  padding: 16px;
  z-index:1200;
}

.checkout-overlay.active{
  display:flex;
}

.checkout-modal{
    background:#fff;
    width:90%;
    max-width:460px;
    border-radius:16px;
    padding:22px 24px;
    box-shadow:0 20px 50px rgba(0,0,0,0.3);
    transform:translateY(20px);
    transition:transform .25s ease;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
}

.checkout-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:5px;
  
}

.checkout-header h2{
 margin:0;
 padding-bottom:0px;
 font-size:20px;
}

.checkout-close{
  border:none;
  background:none;
  font-size:18px;
  cursor:pointer;
}

.checkout-close:hover{
  color:#e11d2e;
}

.checkout-summary-box{
    background:#fff7cc;               /* amarelo post-it */
    border:1px solid #f4d03f;
    border-radius:12px;
    padding:12px 14px;
    margin:14px 0 16px 0;
    box-shadow:0 4px 10px rgba(0,0,0,0.05);
}

.summary-event{
    font-weight:700;
    font-size:14px;
    color:#374151;
    margin-top:4px;
}

.summary-info{
    margin-top:4px;
    font-size:13px;
    line-height: 1.25;
}

.summary-info strong{
    font-size:14px;
}

.summary-savings{
    margin-top:4px;
    color:#047857;
    font-weight:700;
    font-size:12px;
}

.checkout-field select{
  width:100%;

  padding:8px 10px;

  border-radius:8px;
  border:1px solid #d1d5db;

  font-size:14px;
}

.checkout-field{
  margin-bottom:18px;
}

.checkout-field label{
  display:block;
  font-size:14px;
  font-weight:500;

  margin-bottom:6px;
}


.checkout-actions{
  display:flex;
  /*justify-content:space-between;*/

  margin-top:22px;
}

@media (max-width: 640px){
    .checkout-overlay{
        align-items: flex-start;
        padding: 10px;
    }

    .checkout-modal{
        width: 100%;
        max-width: 100%;
        max-height: 95%; /*calc(100vh - 80px);*/
        border-radius: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        bottom: 5px;
    }
}

/* CSS de teste novo visual */
.payment-title{
    display:block;
    text-align:center;
    margin-top:10px;
    margin-bottom:2px;
    font-weight: 600;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.payment-text{
    display:block;
    text-align:center;
    margin-top:0px;
    margin-bottom:8px;
    font-weight: 200;
    color: #374151;
    font-size: 12px;
    line-height: 1.25;
}

.payment-buttons{

    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin-top:10px;
}

.pay-btn{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
}

.pay-btn img{
    width:26px;
}

.pay-btn span{
    font-size:13px;
    font-weight:500;
}

/* hover */

.pay-btn:hover{
    border-color:#9ca3af;
    transform:translateY(-1px);
}

/* selecionado */

.pay-btn.active{
    border:2px solid #dc2626;
    box-shadow:0 4px 10px rgba(0,0,0,0.12);
}

.pay-btn.pix{
    border:2px solid #10b981;
}

/* ================= PAYMENT PANELS ================= */

.payment-dynamic{
    margin-top: 14px;
}

.payment-panel{
    display: none;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.3;
    color: #374151;
}

.payment-panel.active{
    display: block;
}

.payment-panel-title{
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.payment-info{
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.payment-info img{
    width: 20px;
    margin-top: 2px;
    opacity: .75;
}

.payment-info p{
    margin: 0;
}

.card-form{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-form-section{
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-form label{
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0;
    line-height: 1.15;
}

.card-form label small{
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
}

.card-form input{
    width: 100%;
    box-sizing: border-box;
    min-height: 30px !important;
    height: 30px !important;
    padding: 4px 10px !important;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-size: 12px;
    line-height: 1.1;
    color: #111827;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.card-form input:focus{
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.payment-panel .card-form input::placeholder{
    font-size: 12px;
    color: #9ca3af;
}

.card-row{
    display: flex;
    gap: 8px;
}

.card-row > div{
    flex: 1;
    min-width: 0;
}

/* campo opcional um pouco mais baixo visualmente */
#cardAddressComplement{
    height: 38px;
}

/* ================= MOBILE ================= */

@media (max-width: 640px){
    .payment-panel{
        padding: 12px;
        border-radius: 10px;
    }

    .payment-panel-title{
        font-size: 14px;
        margin-bottom: 8px;
    }

    .card-form{
        gap: 12px;
    }

    .card-form input{
        height: 36px;
        padding: 7px 10px;
        font-size: 14px;
    }

    .card-row{
        flex-direction: column;
        gap: 8px;
    }
}

.field-error{
    min-height: 14px;
    font-size: 11px;
    color: #dc2626;
    line-height: 1.2;
    margin-top: 2px;
}

.input-error{
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}


.checkout-security{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    font-size:12px;
    color:#6b7280;

    margin-top:18px;
    margin-bottom:6px;
}

.checkout-security img{
    height:26px;
}
.checkout-actions{
    display:flex;
    gap:12px;
    margin-top:16px;
}

.checkout-actions button{
    flex:1;
}

@media (max-width:600px){

    .payment-buttons{
        justify-content:space-between;
    }

    .pay-btn{
        flex:1;
        height:70px;
    }

}

/* CSS do PIX */
.pix-title{
    text-align:center;
    font-size:18px;
    margin-top:10px;
}

.pix-subtitle{
    text-align:center;
    font-size:14px;
    color:#6b7280;
}

.pix-timer{
    text-align:center;
    margin-top:10px;
    font-size:14px;
    color:#6b7280;
}

.pix-instructions-box{
  background:#f3f4f6;
  border-radius:12px;
  padding:18px;
  margin-top:10px;
}

.pix-instructions-box h3{
  margin-top:0;
  font-size:18px;
}

.pix-steps{
  padding-left:12px;
  font-weight: 200;
  color: #374151;
  margin:5px 0;
  line-height:1;
}

.pix-steps li{
  margin-bottom:6px;
}

.btn-copy-pix{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    margin:12px auto;
    padding:12px 18px;
    background:#dc2626;
    color:#fff;
    border:none;
    border-radius:8px;
    font-weight:600;
    font-size:14px;
    cursor:pointer;

}

.copy-icon{
  width:16px;
  height:16px;
  background:url('/assets/icons/copy.png') center/contain no-repeat;
}

.pix-qrcode{
  display:flex;
  justify-content:center;
  margin:5px 0;
}

.pix-qrcode img{
  width:220px;
  max-width:80%;
}

.pix-countdown{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;

  font-weight:600;
  color:#16a34a;

  margin-top:10px;
}

.clock-icon{
  width:18px;
  height:18px;
  background:url('/assets/icons/clock.png') center/contain no-repeat;
}

.pix-waiting{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  margin:14px 0;

  font-size:14px;
  color:#4b5563;

  text-align:center;
}

.spinner{
  width:18px;
  height:18px;
  border:3px solid #e5e7eb;
  border-top:3px solid #16a34a;
  border-radius:50%;
  animation:spin 0.9s linear infinite;
}

@keyframes spin{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

@media (max-width:480px){

  .pix-waiting{
    flex-direction:column;
    gap:6px;
  }

}