/* qris.css - Final Cleaned & Fixed Version */

/* ===== HIDE/SHOW LOGO BEHAVIOR ===== */
.channel-logo {
  display: none;
}

#qrPopup .qr-logo {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 auto;
}

.popup-channel-grid .flex.items-center.space-x-2 span {
  display: inline-block;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ===== BASE STYLES ===== */
.hidden {
  display: none;
}

.qr-box.hide-animation {
  animation: fadeOut 0.1s ease forwards;
}

[class*="fixed"] {
  transition: opacity 0.1s ease;
}

#confirmModal.show-animation {
  animation: fadeOut 0.1s ease forwards;
}

#qrPopup.fade-in {
  animation: fadeIn 0.1s ease forwards;
}

#qrPopup .close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.25rem;
  z-index: 50;
}

/* ===== QR POPUP STYLES ===== */
#scanInstruction {
  color: #555;
  margin: 1.25rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

#timeLimit {
  color: #666;
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding: 0.75rem;
  background: rgba(0,0,0,0.05);
  border-radius: 0.5rem;
}

#countdownTimer {
  color: #f44336;
  font-weight: bold;
  margin-top: 6px;
  font-size: 14px;
}

/* ===== PAYMENT THEMES ===== */
.shopeepay-theme #qrHeader {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.dana-theme #qrHeader {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.gopay-theme #qrHeader {
  background: linear-gradient(135deg, #00a3e0, #00c4cc);
}

.bank-theme #qrHeader {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.kartukredit-theme #qrHeader {
  background: linear-gradient(135deg, #059669, #10b981);
}

/* ===== MEDIA QUERIES ===== */
#qrImage {
  width: 180px;
  height: 180px;
}

.qr-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

#qrHeader {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

button {
  line-height: 1;
}

/* QR POPUP Base */
#qrPopup .bg-white {
  position: relative;
  width: 90%;
  max-width: 480px;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

#qrPopup .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Tablet */
@media (min-width: 768px) {
  #qrImage {
    width: 220px;
    height: 220px;
  }
  .qr-logos img {
    width: 80px;
    height: 80px;
  }
  #scanInstruction {
    font-size: 1.1rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  #qrImage {
    width: 250px;
    height: 250px;
  }
  #qrPopup .bg-white {
    max-width: 540px;
    padding: 2rem;
  }
  .qr-logos img {
    width: 90px;
    height: 90px;
  }
}

/* Layar besar */
@media (min-width: 1280px) {
  #qrImage {
    width: 280px;
    height: 280px;
  }
  .qr-logos img {
    width: 100px;
    height: 100px;
  }
}

/* HP kecil */
@media (max-width: 360px) {
  #qrImage {
    width: 150px;
    height: 150px;
  }
  .qr-logos img {
    width: 40px;
    height: 40px;
  }
  #qrHeader {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
}

/* Object fit for QR and logos */
#qrImage,
#paymentLogo,
.qr-logos img {
  object-fit: contain;
}
