/* Base & Typography */
:root {
  --primary-color: #1A1F71;     /* Visa Blue */
  --primary-dark: #0F1545;
  --primary-light: #3a4196;
  --secondary-color: #F7B600;   /* Visa Yellow */
  --success-color: #28A745;     /* Green */
  --error-color: #DC3545;       /* Red */
  --border-color: #DEE2E6;
  --text-color: #212529;
  --text-light: #6C757D;
  --background-color: #F8F9FA;
  --white: #FFFFFF;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --input-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background-color);
}

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1, h2, h3 {
  color: var(--primary-color);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background-color: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.visa-logo {
  height: 32px;
  margin-right: 0.5rem;
}

.security-indicators {
  display: flex;
  gap: 1rem;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-color);
}

.security-badge svg {
  color: var(--primary-color);
}

/* Progress Indicator */
.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 1rem auto 2rem;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: relative;
  margin-bottom: 0.5rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: background-color 0.3s, color 0.3s;
}

.progress-step[data-active="true"] .step-circle {
  background-color: var(--primary-color);
  color: var(--white);
}

.progress-step[data-completed="true"] .step-circle {
  background-color: var(--success-color);
  color: var(--white);
}

.step-label {
  font-size: 0.875rem;
  color: var(--text-light);
  transition: color 0.3s;
  text-align: center;
  white-space: nowrap;
}

.progress-step[data-active="true"] .step-label {
  color: var(--primary-color);
  font-weight: 500;
}

.progress-step[data-completed="true"] .step-label {
  color: var(--success-color);
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  max-width: 600px;
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  position: relative;
  margin-top: 1rem;
}

.progress-completed {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Cards and Pages */
.page {
  max-width: 800px;
  margin: 1rem auto 0;
}

.card {
  background-color: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-group {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.form-row > .form-group {
  min-height: 90px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
}

input, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: var(--white);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 31, 113, 0.1);
  z-index: 1000;
}

input:disabled, select:disabled {
  background-color: #f8f9fa;
  cursor: not-allowed;
}

/* Fix for select dropdowns */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

select option {
  color: var(--text-color);
  background-color: var(--white);
  padding: 0.5rem;
}

.input-icon {
  position: relative;
}

.input-icon svg:first-child {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
}

.input-icon input {
  padding-left: 2.5rem;
}

.tooltip-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  cursor: help;
}

.error-message {
  color: var(--error-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  min-height: 1rem;
  display: block;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.expiry-group {
  flex: 1;
}

.expiry-inputs {
  display: flex;
  gap: 0.5rem;
}

.expiry-inputs select {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
  cursor: pointer;
}

.primary-btn {
  color: var(--white);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.primary-btn:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.secondary-btn {
  color: var(--text-color);
  background-color: #e9ecef;
  border-color: #e9ecef;
}

.secondary-btn:hover {
  background-color: #dee2e6;
  border-color: #dee2e6;
}

.action-center {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Home Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background-color: #e6f0ff;
  border-radius: 0.5rem;
}

.feature svg {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature h3 {
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Card Display */
.card-display {
  width: 100%;
  max-width: 400px;
  height: 220px;
  margin: 0 auto 2rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.chip-icon {
  width: 50px;
  height: 34px;
  background-color: var(--secondary-color);
  border-radius: 5px;
}

.visa-logo-white {
  height: 24px;
}

.card-number {
  display: flex;
  justify-content: center;
  font-size: 1.5rem;
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: 2rem;
}

.card-details {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.card-details-label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.card-holder-name, .card-expiry {
  font-weight: 500;
  letter-spacing: 1px;
}

/* Security Note */
.security-note {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: #e6f0ff;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.security-note svg {
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--primary-color);
}

.security-note h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.security-note p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Confirmation Page */
.confirmation-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--white);
  animation: scale-up 0.5s ease;
}

@keyframes scale-up {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.redirect-notice {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Footer */
footer {
  background-color: #f1f3f5;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #e9ecef;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
}

.copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Form text helper */
.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Email hint */
.email-hint {
  margin: 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .logo {
    margin-bottom: 0.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .progress-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .progress-step {
    padding: 0 0.5rem;
  }
  
  .step-label {
    font-size: 0.75rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

/* Small screen fixes */
@media (max-width: 480px) {
  .progress-step {
    padding: 0 0.25rem;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  .card-display {
    height: 200px;
    padding: 1rem;
  }
  
  .card-number {
    font-size: 1.25rem;
  }
}