/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #DC143C;
  --primary-dark: #B22222;
  --secondary: #FF0000;
  --light-red: #FF6B6B;
  --success: #43a047;
  --error: #e53935;
  --warning: #F1C376;
  --text: #033346;
  --text-light: #607d8b;
  --border: #e5e7eb;
  --bg: #f9fafb;
  --white: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #DC143C 0%, #FF0000 100%);
  color: var(--white);
  padding: 30px 0;
  box-shadow: var(--shadow-lg);
}

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

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

.header-right {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

.logo-text p {
  font-size: 16px;
  opacity: 0.9;
}

/* Main Content */
.main {
  flex: 1;
  padding: 40px 0;
}

.step {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 16px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border);
}

.tab {
  background: none;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Information Section */
.info-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.info-card {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.info-card.highlight {
  background: linear-gradient(135deg, #fef7f0 0%, #fed7aa 20%, #fef7f0 100%);
  border-color: #f59e0b;
}

.info-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 20px;
  display: block;
}

.info-card h3 {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.info-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  color: var(--text);
  padding: 8px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-steps {
  padding-left: 0;
  counter-reset: step-counter;
}

.info-steps li {
  color: var(--text);
  padding: 12px 0;
  margin-left: 30px;
  position: relative;
  counter-increment: step-counter;
}

.info-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: -30px;
  top: 12px;
  background: var(--primary);
  color: var(--white);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.important-notes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.note-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border-left: 4px solid var(--warning);
}

.note-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.note-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.note-item p {
  color: var(--text-light);
  margin: 0;
  font-size: 14px;
  text-align: left;
}

/* Call to Action Section */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.cta-section h3 {
  font-size: 28px;
  margin-bottom: 16px;
  font-weight: 700;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  min-width: 120px;
}

.stat strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--white);
}

.stat span {
  font-size: 14px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Design for Info Section */
@media (max-width: 768px) {
  .info-section {
    padding: 20px;
    margin-bottom: 30px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .info-card {
    padding: 20px;
  }

  .info-icon {
    font-size: 36px;
    margin-bottom: 16px;
  }

  .info-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .info-card p {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .info-steps li {
    margin-left: 25px;
    padding: 10px 0;
  }

  .info-steps li::before {
    left: -25px;
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .note-item {
    padding: 12px;
    gap: 12px;
  }

  .note-icon {
    font-size: 20px;
  }

  .cta-section {
    padding: 30px 20px;
  }

  .cta-section h3 {
    font-size: 24px;
  }

  .cta-section p {
    font-size: 16px;
  }

  .cta-stats {
    gap: 20px;
  }

  .stat strong {
    font-size: 24px;
  }

  .stat span {
    font-size: 12px;
  }
}

/* Packages Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.package-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.package-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.package-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.1) 0%, rgba(255, 0, 0, 0.1) 100%);
}

.package-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.package-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.package-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.package-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.package-description {
  font-size: 14px;
  color: var(--text-light);
}

/* Buttons */
.btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--border);
}

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

/* Form */
.payment-form {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.selected-package-info {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid var(--primary);
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

input, select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
}

small {
  display: block;
  margin-top: 6px;
  color: var(--text-light);
  font-size: 14px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.form-actions .btn {
  flex: 1;
}

/* Processing */
.processing, .success, .error {
  text-align: center;
  background: var(--white);
  padding: 60px 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

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

.instructions {
  background: #fff3cd;
  border-left: 4px solid var(--warning);
  padding: 16px;
  margin-top: 24px;
  border-radius: 4px;
  text-align: left;
}

/* Success */
.success-icon {
  font-size: 72px;
  margin-bottom: 20px;
}

.voucher-display {
  background: var(--bg);
  border: 2px dashed var(--primary);
  border-radius: 8px;
  padding: 24px;
  margin: 30px 0;
}

.voucher-label {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.voucher-code {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: 2px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

.success-instructions {
  text-align: left;
  background: var(--bg);
  padding: 24px;
  border-radius: 8px;
  margin: 24px 0;
}

.success-instructions h3 {
  margin-bottom: 16px;
}

.success-instructions ol {
  padding-left: 20px;
}

.success-instructions li {
  margin-bottom: 8px;
}

/* Error */
.error-icon {
  font-size: 72px;
  margin-bottom: 20px;
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

/* Footer */
.footer {
  background: var(--white);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer p {
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 14px;
}

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

.footer a:hover {
  text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay .spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
  width: 60px;
  height: 60px;
}

/* Responsive */
@media (max-width: 768px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .error-actions {
    flex-direction: column;
  }

  h2 {
    font-size: 24px;
  }

  .header {
    padding: 20px 0;
  }

  .logo {
    gap: 12px;
  }

  .logo-image {
    height: 36px;
  }

  .logo-text h1 {
    font-size: 24px;
  }

  .payment-form {
    padding: 20px;
  }
}

/* Price Breakdown with Local Currency */
.price-breakdown {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #bae6fd;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 16px;
}

.breakdown-row span:first-child {
  color: #374151;
  font-weight: 500;
}

.breakdown-value {
  font-weight: 700;
  color: #1f2937;
}

.breakdown-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #bae6fd, transparent);
  margin: 8px 0;
}

.exchange-info {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
}

.exchange-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #6b7280;
  font-size: 14px;
}

.spinner-small {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.6s linear infinite;
}

/* Provider Select with Logos */
.provider-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.provider-logo-display {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

.provider-select-wrapper #provider {
  flex: 1;
  padding-left: 52px;
}

.provider-select-wrapper #provider[data-has-logo="true"] {
  padding-left: 52px;
}
