/* 3DS Modal Styles */

.tds-timer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px auto;
  width: 100%;
}

.tds-timer-circle {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}

.tds-timer-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.tds-timer-circle-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 8;
}

.tds-timer-circle-progress {
  fill: none;
  stroke: #000000;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

/* Cores do círculo por banco */
.tds-modal.bank-nubank .tds-timer-circle-progress {
  stroke: #820ad1;
}

.tds-modal.bank-nubank .tds-timer {
  color: #820ad1;
}

.tds-modal.bank-inter .tds-timer-circle-progress {
  stroke: #ff7a00;
}

.tds-modal.bank-inter .tds-timer {
  color: #ff7a00;
}

.tds-modal.bank-santander .tds-timer-circle-progress {
  stroke: #e40000;
}

.tds-modal.bank-santander .tds-timer {
  color: #e40000;
}

.tds-modal.bank-itau .tds-timer-circle-progress {
  stroke: #ec7000;
}

.tds-modal.bank-itau .tds-timer {
  color: #ec7000;
}

.tds-timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.tds-timer {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  display: block;
}

.tds-timer-label {
  font-size: 9px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
  display: block;
}

.tds-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tds-modal.active {
  display: flex;
}

.tds-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: tds-fadeIn 0.3s ease;
}

.tds-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: tds-slideUp 0.3s ease;
  z-index: 1;
}

.tds-modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.tds-bank-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: #f3f4f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tds-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
  line-height: 1.3;
}

.tds-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.tds-modal-body {
  padding: 24px 32px;
}

.tds-form {
  display: block;
}

.tds-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  margin-bottom: 24px;
}

.tds-info-box.tds-info-inter {
  background: #fff8e6; /* Laranja claro */
  border-color: #ff7a00; /* Laranja Inter */
}

.tds-info-box.tds-info-santander {
  background: #feeaea; /* Vermelho claro */
  border-color: #e40000; /* Vermelho Santander */
}

.tds-info-box.tds-info-itau {
  background: #fff5e6;
  border-color: #ffb347;
}

.tds-info-box svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.tds-info-box span {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.tds-field {
  margin-bottom: 20px;
}

.tds-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.tds-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  color: #111827;
  background: #ffffff;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.tds-input:focus {
  border-color: #820ad1;
  box-shadow: 0 0 0 3px rgba(130, 10, 209, 0.1);
}

.tds-input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.tds-input-password {
  font-size: 24px;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 600;
}

.tds-hint {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.4;
}

.tds-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  margin-top: 16px;
  display: none;
}

.tds-error:before {
  content: '⚠️ ';
  margin-right: 4px;
}

.tds-modal-footer {
  padding: 24px 32px 32px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #e5e7eb;
}

.tds-btn {
  flex: 1;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.tds-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tds-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.tds-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.tds-btn-primary {
  background: #820ad1;
  color: #ffffff;
}

.tds-btn-primary.tds-btn-itau {
  background: #ff6600;
}

.tds-btn-primary:hover:not(:disabled) {
  background: #6b0ab0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(130, 10, 209, 0.3);
}

.tds-btn-primary.tds-btn-itau:hover:not(:disabled) {
  background: #e65c00;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

/* Estilos personalizados por banco */

/* Nubank */
.tds-modal.bank-nubank .tds-input:focus {
  border-color: #820ad1;
  box-shadow: 0 0 0 3px rgba(130, 10, 209, 0.1);
}

.tds-modal.bank-nubank .tds-btn-primary {
  background: #820ad1;
}

.tds-modal.bank-nubank .tds-btn-primary:hover:not(:disabled) {
  background: #6b0ab0;
  box-shadow: 0 4px 12px rgba(130, 10, 209, 0.3);
}

/* Itaú */
.tds-modal.bank-itau .tds-input:focus {
  border-color: #ec7000;
  box-shadow: 0 0 0 3px rgba(236, 112, 0, 0.1);
}

.tds-modal.bank-itau .tds-btn-primary {
  background: #ec7000;
}

.tds-modal.bank-itau .tds-btn-primary:hover:not(:disabled) {
  background: #d66300;
  box-shadow: 0 4px 12px rgba(236, 112, 0, 0.3);
}

/* Inter */
.tds-modal.bank-inter .tds-input:focus {
  border-color: #ff7a00;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.tds-modal.bank-inter .tds-btn-primary {
  background: #ff7a00;
}

.tds-modal.bank-inter .tds-btn-primary:hover:not(:disabled) {
  background: #e66d00;
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

/* Santander */
.tds-modal.bank-santander .tds-input:focus {
  border-color: #e40000;
  box-shadow: 0 0 0 3px rgba(228, 0, 0, 0.1);
}

.tds-modal.bank-santander .tds-btn-primary {
  background: #e40000;
}

.tds-modal.bank-santander .tds-btn-primary:hover:not(:disabled) {
  background: #cc0000;
  box-shadow: 0 4px 12px rgba(228, 0, 0, 0.3);
}

.tds-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.tds-spinner {
  width: 20px;
  height: 20px;
  animation: tds-spin 1s linear infinite;
}

.tds-spinner-circle {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 25;
  animation: tds-dash 1.5s ease-in-out infinite;
}

.tds-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: #f0fdf4;
  border-top: 1px solid #bbf7d0;
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}

.tds-security-badge svg {
  flex-shrink: 0;
}

/* Animations */
@keyframes tds-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tds-slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes tds-dash {
  0% {
    stroke-dashoffset: 50;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -50;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .tds-modal-content {
    width: 95%;
    border-radius: 12px;
  }

  .tds-modal-header {
    padding: 24px 20px 20px;
  }

  .tds-title {
    font-size: 20px;
  }

  .tds-modal-body {
    padding: 20px;
  }

  .tds-modal-footer {
    padding: 20px;
    flex-direction: column;
  }

  .tds-btn {
    width: 100%;
  }
}

/* Scrollbar customization */
.tds-modal-content::-webkit-scrollbar {
  width: 8px;
}

.tds-modal-content::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 0 16px 16px 0;
}

.tds-modal-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.tds-modal-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
