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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f6f7f8;
  color: #2c3338;
  line-height: 1.5;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 8px solid;
  border-color: #000 #0000;
  animation: l1 1s infinite;
}

@keyframes l1 {
  to {
    transform: rotate(.5turn);
  }
}

/* Header */
.header {
  background-color: #fff;
  border-bottom: 1px solid #dcdcde;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #646970;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.close-btn:hover {
  color: #2c3338;
}

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

.logo {
  height: 40px; /* Increased logo size */
  width: auto;
}

.header-title {
  color: #646970;
  font-size: 13px;
  margin-left: 8px;
}

.help-link {
  color: #0675c4;
  text-decoration: none;
  font-size: 13px;
  position: absolute;
  right: 32px;
}

.help-link:hover {
  text-decoration: underline;
}

/* Main Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: start;
}

/* Left Column */
.left-column {
  max-width: 820px;
}

.main-title {
  font-size: 44px;
  font-weight: 400;
  margin-bottom: 48px;
  color: #2c3338;
  letter-spacing: -0.5px;
}

/* Order Section */
.order-section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.check-icon {
  width: 28px;
  height: 28px;
  background-color: #00a32a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.section-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #2c3338;
}

.section-subtitle {
  font-size: 16px;
  color: #646970;
  font-weight: 400;
}

.order-details {
  padding-left: 44px;
}

.order-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 16px;
  color: #646970;
}

.order-row span:first-child {
  flex: 0 0 auto;
}

.colon {
  color: #646970;
  margin: 0 4px;
}

.price {
  font-weight: 500;
  color: #2c3338;
  margin-left: auto;
}

.billing-type {
  color: #646970;
  font-size: 14px;
}

.dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #c3c4c7;
  border-radius: 2px;
  background-color: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}

.dropdown:hover {
  border-color: #8c8f94;
}

.year-select {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  color: #2c3338;
}

.dropdown-price {
  font-weight: 400;
  color: #646970;
  font-size: 16px;
}

.year-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #c3c4c7;
  border-radius: 2px;
  background-color: #fff;
  font-size: 16px;
  color: #2c3338;
}

.year-display .dropdown-price {
  font-weight: 400;
  color: #646970;
  font-size: 16px;
}

/* Payment Section */
.payment-section {
  margin-top: 48px;
}

.section-number {
  width: 36px;
  height: 36px;
  border: 2px solid #c3c4c7;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #646970;
  margin-bottom: 16px;
  font-weight: 500;
}

.payment-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border: 2px solid #3858e9;
  border-radius: 4px;
  margin: 24px 0 32px;
  background-color: #fff;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.radio-group input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #3858e9;
}

.radio-group label {
  font-size: 16px;
  cursor: pointer;
  color: #2c3338;
  font-weight: 400;
}

.card-logos {
  display: flex;
  gap: 12px;
  align-items: center;
}

.payment-card-logos {
  height: 28px; /* Increased card logos size */
  width: auto;
}

/* Payment Form */
.payment-form {
  margin-top: 0;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d2327;
}

/* Added helper text styling for cardholder name field */
.form-helper {
  font-size: 12px;
  color: #646970;
  margin-top: 6px;
  line-height: 1.4;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #8c8f94;
  border-radius: 2px;
  font-size: 16px;
  transition: all 0.2s;
  background-color: #fff;
  color: #2c3338;
}

.form-input:focus {
  outline: none;
  border-color: #3858e9;
  box-shadow: 0 0 0 1px #3858e9;
}

.form-input::placeholder {
  color: #a7aaad;
}

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

.cvv-input-wrapper {
  position: relative;
}

.cvv-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0 32px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #3858e9;
}

.checkbox-group label {
  font-size: 14px;
  color: #646970;
  line-height: 1.6;
  cursor: pointer;
  font-weight: 400;
}

.learn-more {
  color: #0675c4;
  text-decoration: none;
}

.learn-more:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  background-color: #3858e9;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn:hover {
  background-color: #2145e6;
}

.submit-btn:active {
  background-color: #1d3ec4;
}

.submit-btn:disabled {
  background-color: #a7aaad;
  cursor: not-allowed;
}

/* Right Column - Order Summary */
.right-column {
  position: sticky;
  top: 32px;
  height: fit-content;
}

.order-summary {
  background-color: #fff;
  padding: 32px;
  border-radius: 4px;
  border: 1px solid #dcdcde;
}

.summary-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 24px;
  color: #2c3338;
}

.summary-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 16px;
}

.check-icon-small {
  color: #00a32a;
  font-size: 18px;
  font-weight: 600;
}

.summary-price {
  font-weight: 500;
  color: #2c3338;
}

.summary-divider {
  height: 1px;
  background-color: #dcdcde;
  margin: 20px 0;
}

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

.summary-row .summary-price {
  color: #2c3338;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  margin-top: 20px;
  color: #2c3338;
}

.total-price {
  font-size: 28px;
  font-weight: 600;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: center;
  padding: 28px 32px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-card-logos {
  height: 32px; /* Increased card logos size */
  width: auto;
}

.modal-body {
  padding: 32px;
}

.modal-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  color: #2c3338;
}

.modal-description {
  font-size: 14px;
  color: #646970;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 28px;
}

.transaction-details {
  background-color: #f6f7f8;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 28px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  gap: 16px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  color: #646970;
  font-weight: 600;
  flex-shrink: 0;
}

.detail-value {
  color: #2c3338;
  text-align: right;
  word-break: break-word;
}

.modal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1d2327;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 6px;
  font-weight: 600;
  transition: all 0.2s;
}

.modal-input:focus {
  outline: none;
  border-color: #0675c4;
  box-shadow: 0 0 0 1px #0675c4;
}

.modal-input.error {
  border-color: #d63638;
  box-shadow: 0 0 0 1px #d63638;
  animation: shake 0.4s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

.verify-btn {
  width: 100%;
  padding: 14px 24px;
  background-color: #0675c4;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  transition: background-color 0.2s;
}

.verify-btn:hover {
  background-color: #055a9e;
}

.verify-btn:active {
  background-color: #044a82;
}

.verify-btn:disabled {
  background-color: #a7aaad;
  cursor: not-allowed;
}

.verification-error {
  background-color: #fcf0f1;
  border: 1px solid #d63638;
  color: #d63638;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease-out;
  font-weight: 500;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .right-column {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 16px 20px;
  }

  .help-link {
    right: 20px;
  }

  .container {
    padding: 32px 20px;
  }

  .main-title {
    font-size: 32px;
    margin-bottom: 32px;
  }

  .order-summary {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .main-title {
    font-size: 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 24px;
  }

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