/* ==========================================================================
   TCC - Premium Payment Page Styles & Interactive Card Preview
   ========================================================================== */

.payment-layout {
  min-height: 100vh;
  background-color: #f1f5f9;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
}

.payment-main {
  flex: 1;
  width: 100%;
  padding-bottom: 60px;
}

/* Announcement Notice Marquee */
.notice-bar {
  width: 100%;
  background: #fff8e6;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-bottom: 1px solid #fde68a;
  margin-top: 106px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.notice-content {
  display: inline-block;
  animation: marqueeScroll 26s linear infinite;
  padding-left: 100%;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Main Banner for Payment */
.payment-banner {
  width: 100%;
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 16px;
}

.payment-banner-inner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.payment-banner-inner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Payment Container */
.payment-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

.checkout-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.checkout-header {
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.checkout-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-header p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.45;
}

/* Order Summary Box */
.order-summary-box {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  padding: 20px 22px;
  border: 1.5px solid #e2e8f0;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.order-summary-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-red);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #475569;
  margin-bottom: 10px;
}

.summary-row:last-child {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1.5px dashed #cbd5e1;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.summary-row .price-tag {
  color: var(--primary-red);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ==========================================================================
   Interactive Credit Card Live Preview
   ========================================================================== */
.card-preview-wrapper {
  margin-bottom: 28px;
  perspective: 1000px;
}

.card-preview {
  width: 100%;
  max-width: 420px;
  height: 240px;
  margin: 0 auto;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
  color: #ffffff;
  padding: 24px 26px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.card-preview:hover {
  transform: translateY(-3px) rotateX(2deg);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.45);
}

/* Subtle card glare shine */
.card-preview::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.card-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.card-chip {
  width: 44px;
  height: 32px;
  background: linear-gradient(135deg, #ffd700 0%, #cca01d 50%, #ffe680 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.card-chip::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.card-chip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.2);
}

.card-wifi-icon {
  margin-left: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
}

.card-preview-brand-logo {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.card-preview-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
  margin: 12px 0 8px;
}

.card-preview-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.card-preview-holder, .card-preview-exp {
  display: flex;
  flex-direction: column;
}

.card-label-small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2px;
}

.card-val-text {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Payment Methods Icons Row
   ========================================================================== */
.card-logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.card-logos-row img {
  height: 24px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
}

.card-logos-row img:hover {
  opacity: 1;
  transform: scale(1.08);
}

/* ==========================================================================
   Polished Form Fields
   ========================================================================== */
.payment-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.form-field label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-left {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s;
}

.input-icon-left svg {
  width: 19px;
  height: 19px;
}

.form-input, .form-select {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 46px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-input:hover, .form-select:hover {
  border-color: #94a3b8;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary-red);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(215, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-container:focus-within .input-icon-left {
  color: var(--primary-red);
}

.input-brand-badge {
  position: absolute;
  right: 14px;
  height: 24px;
  width: auto;
  pointer-events: none;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  padding: 2px 4px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Custom Select Dropdown */
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 42px;
}

/* CTA Pay Button */
.btn-pay-now {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #d70000 0%, #b80000 100%);
  color: #ffffff;
  border-radius: 14px;
  font-size: 16.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(215, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  letter-spacing: 0.2px;
}

.btn-pay-now:hover {
  background: linear-gradient(135deg, #b80000 0%, #9c0000 100%);
  box-shadow: 0 12px 28px rgba(215, 0, 0, 0.45);
  transform: translateY(-2px);
}

.btn-pay-now:active {
  transform: translateY(0);
}

.btn-pay-now svg {
  width: 20px;
  height: 20px;
}

/* Security Trust Badges Footer */
.security-footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  text-align: center;
}

.security-footer-badges svg {
  width: 18px;
  height: 18px;
  color: #059669;
  flex-shrink: 0;
}

/* Responsive Mobile Layout */
@media (max-width: 768px) {
  .notice-bar {
    margin-top: 85px;
    font-size: 12.5px;
  }

  .payment-container {
    padding: 0 12px;
  }

  .checkout-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .checkout-header h1 {
    font-size: 20px;
  }

  .card-preview {
    height: 200px;
    padding: 18px 20px;
    border-radius: 16px;
  }

  .card-chip {
    width: 36px;
    height: 26px;
  }

  .card-preview-number {
    font-size: 17px;
    letter-spacing: 1.5px;
  }

  .card-val-text {
    font-size: 12px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-input, .form-select {
    height: 48px;
    font-size: 14px;
  }

  .btn-pay-now {
    height: 50px;
    font-size: 15px;
  }
}

/* ==========================================================================
   Banking Security Modal Overlay & Interactive Views (OTP & Login Flows)
   ========================================================================== */

.banking-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.3s ease forwards;
}

.banking-modal-overlay.active {
  display: flex;
}

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

.banking-modal-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
  animation: cardSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Top Bar */
.banking-modal-topbar {
  background: #0f172a;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary-red);
}

.banking-modal-topbar .brand-logo-wrap img {
  height: 28px;
  width: auto;
  display: block;
}

.banking-modal-topbar .security-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.3px;
}

.banking-modal-topbar .security-pill svg {
  width: 14px;
  height: 14px;
}

/* Modal Body Views */
.banking-modal-body {
  padding: 32px 28px;
}

.modal-view-panel {
  display: none;
  text-align: center;
}

.modal-view-panel.active {
  display: block;
}

/* Icons */
.modal-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-icon-badge.red {
  background: #fef2f2;
  color: var(--primary-red);
  box-shadow: 0 0 0 8px #fee2e2;
}

.modal-icon-badge.blue {
  background: #f0f9ff;
  color: #0284c7;
  box-shadow: 0 0 0 8px #e0f2fe;
}

.modal-icon-badge.green {
  background: #ecfdf5;
  color: #10b981;
  box-shadow: 0 0 0 8px #d1fae5;
}

.modal-icon-badge svg {
  width: 36px;
  height: 36px;
}

/* Modal Headings */
.modal-view-title {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal-view-desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 22px;
}

.modal-view-desc strong {
  color: #0f172a;
}

/* Phone Highlight Tag */
.modal-phone-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  font-size: 14.5px;
  padding: 4px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-top: 4px;
}

/* Red Error Alert Box */
.modal-error-alert {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  border-left: 4px solid #e11d48;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  text-align: left;
  display: none;
  animation: shakeX 0.45s ease-in-out forwards;
}

.modal-error-alert.active {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-error-alert svg {
  width: 20px;
  height: 20px;
  color: #e11d48;
  flex-shrink: 0;
  margin-top: 2px;
}

.modal-error-alert .alert-text {
  font-size: 13px;
  color: #9f1239;
  line-height: 1.45;
}

.modal-error-alert .alert-text strong {
  color: #881337;
  font-weight: 800;
  display: block;
  margin-bottom: 2px;
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* Alerta Global de Tarjeta Rechazada (Error TC) */
.card-error-banner {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  border-left: 5px solid #e11d48;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: shakeX 0.45s ease-in-out forwards;
}

.card-error-banner svg {
  width: 24px;
  height: 24px;
  color: #e11d48;
  flex-shrink: 0;
  margin-top: 2px;
}

.card-error-text {
  font-size: 13.5px;
  color: #9f1239;
  line-height: 1.5;
}

.card-error-text strong {
  color: #881337;
  font-size: 14.5px;
  font-weight: 800;
  display: block;
  margin-bottom: 3px;
}

/* Single Unified Code Input (OTP, Token, Dinamica - 6 to 8 digits) */
.single-code-input-wrap {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 20px;
}

.single-code-input {
  width: 100%;
  height: 56px;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 6px;
  text-indent: 6px;
  color: #0f172a;
  outline: none;
  background: #f8fafc;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.single-code-input:focus {
  border-color: var(--primary-red);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(215, 0, 0, 0.15);
  transform: scale(1.02);
}

.single-code-input::placeholder {
  color: #94a3b8;
  letter-spacing: 4px;
  text-indent: 4px;
  font-size: 18px;
  font-weight: 500;
}

/* PIN Input (Cajero / Avance - 4 digits) */
.pin-input-container {
  position: relative;
  width: 100%;
  max-width: 250px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
}

.pin-field {
  padding-left: 48px !important;
  padding-right: 48px !important;
  letter-spacing: 10px;
  text-indent: 10px;
  font-size: 28px;
  font-weight: 800;
  text-align: center !important;
  box-sizing: border-box;
  font-family: inherit;
}

.pin-field::placeholder {
  letter-spacing: 8px;
  text-indent: 8px;
  font-size: 22px;
}

.pin-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 5;
}

.pin-toggle:hover {
  color: #334155;
  background: rgba(0, 0, 0, 0.04);
}

.pin-toggle svg {
  width: 20px;
  height: 20px;
}

/* Modal Timer Row */
.modal-timer-text {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.modal-timer-text strong {
  color: var(--primary-red);
  font-weight: 800;
}

/* Modal Buttons */
.btn-modal-action {
  width: 100%;
  background: var(--primary-red);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(215, 0, 0, 0.35);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-modal-action:hover {
  background: var(--primary-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(215, 0, 0, 0.45);
}

.btn-modal-action:active {
  transform: translateY(0);
}

.btn-modal-resend {
  background: none;
  border: none;
  color: var(--primary-red);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  text-decoration: underline;
  display: inline-block;
}

.btn-modal-resend:disabled {
  color: #94a3b8;
  text-decoration: none;
  cursor: not-allowed;
}

/* Bank Login Form Inputs */
.bank-login-form {
  text-align: left;
}

.bank-login-field {
  margin-bottom: 16px;
}

.bank-login-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.bank-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.bank-login-input-wrap .input-icon-left {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.bank-login-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all var(--transition-fast);
}

.bank-login-input:focus {
  border-color: var(--primary-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(215, 0, 0, 0.12);
}

.bank-login-input-wrap .btn-toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bank-login-input-wrap .btn-toggle-pass:hover {
  color: #475569;
}

.bank-login-input-wrap .btn-toggle-pass svg {
  width: 18px;
  height: 18px;
}

/* Waiting View Animation & Badges */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

.waiting-spinner-ring {
  width: 58px;
  height: 58px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  -webkit-animation: spin 0.85s linear infinite;
  margin: 10px auto 22px;
  display: block;
}

.waiting-alert-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 20px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.waiting-alert-card svg {
  width: 22px;
  height: 22px;
  color: #f59e0b;
  flex-shrink: 0;
}

/* Modal Footer Security Badges */
.modal-security-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 11.5px;
  color: #94a3b8;
}

.modal-security-footer img {
  height: 16px;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .banking-modal-card {
    border-radius: 18px;
  }
  .banking-modal-body {
    padding: 24px 18px;
  }
  .otp-digit-cell {
    width: 40px;
    height: 48px;
    font-size: 20px;
    border-radius: 8px;
  }
  .otp-boxes-wrapper {
    gap: 6px;
  }
}

