﻿/* ===== Main checkout page (email + name only) ===== */
.checkout-wrapper {
  background: #ffffff;
  color: #1a1d21;
  padding: 40px;
  border-radius: 14px;
  max-width: 900px;
  margin: 40px auto;
  border: 1px solid #eef1f4;
}
.checkout-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; gap: 20px; }
  .checkout-sidebar { border-right: none !important; border-bottom: 1px solid #eef1f4; padding-right: 0 !important; padding-bottom: 30px; }
}
.checkout-sidebar {
  border-right: 1px solid #eef1f4;
  padding-right: 30px;
}

/* ===== Tebex-style Payment Modal ===== */
.tbx-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  animation: tbx-fade .3s ease;
  font-family: 'Open Sans', Arial, sans-serif;
}
@keyframes tbx-fade { from { opacity: 0; } to { opacity: 1; } }
.tbx-modal__wrap {
  width: 100%;
  max-width: 960px;
  position: relative;
  animation: tbx-pop .3s ease;
}
@keyframes tbx-pop { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.tbx-checkout {
  background: #fff;
  color: #333;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 760px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  font-size: 14px;
  line-height: 1.5;
}

/* Sidebar */
.tbx-sidebar {
  background: #f5f5f5;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.tbx-sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.tbx-sidebar-top h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: #333;
}
.tbx-cancel {
  font-size: 13px;
  color: #333;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.tbx-items { display: flex; flex-direction: column; gap: 14px; }
.tbx-item { display: flex; align-items: center; gap: 12px; }
.tbx-item-thumb {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #222;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.tbx-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tbx-item-info { display: flex; flex-direction: column; min-width: 0; }
.tbx-item-name { font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbx-item-price { font-size: 12px; color: #777; margin-top: 1px; }
.tbx-sidebar-middle { flex: 1; }
.tbx-code-block { margin-top: 22px; }
.tbx-code-block label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}
.tbx-code-block input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #dcdcdc;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  border-radius: 2px;
  outline: none;
}
.tbx-code-block input::placeholder { color: #b5b5b5; }
.tbx-code-block input:focus { border-color: #45b3ad; }
.tbx-totals { margin-top: 24px; border-top: 1px solid #e4e4e4; padding-top: 16px; }
.tbx-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: #333;
}
.tbx-total-row.grand {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
}

/* Main area */
.tbx-main {
  padding: 24px 32px 28px;
  display: flex;
  flex-direction: column;
}
.tbx-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9a9a9a;
  margin-bottom: 18px;
}
.tbx-breadcrumbs .sep { color: #c4c4c4; }
.tbx-breadcrumbs .active { color: #2ca5a0; font-weight: 600; }
.tbx-breadcrumbs .done { color: #9a9a9a; }

.tbx-field { margin-bottom: 14px; }
.tbx-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}
.tbx-field input[type="text"],
.tbx-field input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d8d8d8;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s;
}
.tbx-field input:focus { border-color: #45b3ad; }
.tbx-field input::placeholder { color: #bcbcbc; }

.tbx-pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 10px;
}
.tbx-warn {
  margin: 10px 0 12px;
  padding: 12px 14px;
  background: #fff8e6;
  border: 1px solid #f3d98a;
  border-radius: 2px;
  color: #7a5a00;
  font-size: 13px;
  line-height: 1.5;
}
.tbx-warn strong { color: #5c4300; }
.tbx-pay-method {
  border: 1px solid #d8d8d8;
  background: #fff;
  border-radius: 2px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  padding: 6px;
  font-family: inherit;
}
.tbx-pay-method:hover { border-color: #b0b0b0; }
.tbx-pay-method.selected {
  border: 2px solid #7bcfca;
  background: #e5f5f4;
}
.tbx-pay-method svg { max-height: 30px; max-width: 100%; }

.tbx-more-methods {
  width: 100%;
  padding: 11px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #2ca5a0;
  font-weight: 600;
  font-size: 13px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 18px;
}
.tbx-more-methods:hover { background: #f7fcfc; }

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

.tbx-dropin-wrap {
  margin: 6px 0 14px;
  min-height: 180px;
  position: relative;
}
.tbx-dropin-loading {
  padding: 40px 0;
  text-align: center;
  color: #9a9a9a;
  font-size: 13px;
}
.tbx-dropin-shield {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  z-index: 10;
  text-align: center;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
  padding: 20px;
  border-radius: 2px;
}
.tbx-dropin-shield strong { color: #333; }

.tbx-checkboxes { margin: 14px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.tbx-cb-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  cursor: pointer;
}
.tbx-cb-row input {
  margin: 3px 0 0;
  width: 14px;
  height: 14px;
  accent-color: #45b3ad;
  flex-shrink: 0;
  cursor: pointer;
}
.tbx-cb-row a { color: #333; text-decoration: underline; }

.tbx-pay-btn {
  width: 100%;
  padding: 15px;
  background: #45b3ad;
  color: #2a2a2a;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.tbx-pay-btn:hover:not(:disabled) { background: #3ea19b; }
.tbx-pay-btn:disabled { background: #c8ccd1; cursor: not-allowed; color: #fff; }

.tbx-err {
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: #fdecec;
  border: 1px solid #f4bbbb;
  border-radius: 2px;
  color: #8a1f1f;
  font-size: 13px;
}

/* Footer */
.tbx-footer {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #eee;
  font-size: 11px;
  color: #999;
}
.tbx-footer-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.tbx-logo-mini { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: #333; }
.tbx-footer-text { color: #333; max-width: 300px; line-height: 1.4; }
.tbx-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.tbx-footer-links a { color: #666; text-decoration: underline; font-size: 11px; }

@media (max-width: 760px) {
  .tbx-checkout { grid-template-columns: 1fr; min-height: 0; }
  .tbx-pay-methods { grid-template-columns: repeat(2, 1fr); }
  .tbx-row-2 { grid-template-columns: 1fr; }
  .tbx-footer { flex-direction: column; align-items: flex-start; }
}

/* Inline Airwallex card field + our own gated Pay button */
.tbx-card-field {
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  padding: 13px 14px;
  background: #fff;
  margin: 6px 0 14px;
  transition: border-color 0.15s;
}
.tbx-card-field:focus-within { border-color: #45b3ad; }
.tbx-card-field #tbx-card { min-height: 22px; }
.tbx-pay-hint {
  font-size: 12px;
  color: #9a9a9a;
  text-align: center;
  margin-top: 8px;
  min-height: 14px;
}
