.tloc-rg-card-panel[hidden],
.tloc-rg-return[hidden] {
  display: none !important;
}

.tloc-rg-card-panel {
  margin-top: 24px;
}

.tloc-rg-body {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.15fr);
  gap: 28px;
  align-items: start;
}

.tloc-rg-summary {
  border: 1px solid rgba(21, 91, 70, 0.14);
  background: #f7faf8;
  border-radius: 18px;
  padding: 20px;
}

.tloc-rg-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(21, 91, 70, 0.1);
}

.tloc-rg-summary > div:last-child {
  border-bottom: 0;
}

.tloc-rg-summary span {
  color: #5b665f;
}

.tloc-rg-summary strong {
  color: #153f33;
  text-align: right;
}

.tloc-rg-summary__total {
  margin-top: 6px;
  padding-top: 16px !important;
  font-size: 1.08rem;
}

.tloc-rg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tloc-rg-grid__wide {
  grid-column: 1 / -1;
}

.tloc-rg-form label > span,
.tloc-rg-purpose legend {
  display: block;
  margin-bottom: 7px;
  color: #23473b;
  font-weight: 700;
  font-size: 0.92rem;
}

.tloc-rg-form input[type="text"],
.tloc-rg-form input[type="email"],
.tloc-rg-form input[type="tel"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(21, 91, 70, 0.22);
  border-radius: 12px;
  background: #fff;
  padding: 10px 13px;
  color: #24372f;
  font: inherit;
  box-sizing: border-box;
}

.tloc-rg-form input:focus {
  outline: 2px solid rgba(201, 155, 46, 0.3);
  outline-offset: 1px;
  border-color: #c99b2e;
}

.tloc-rg-purpose {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.tloc-rg-purpose label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 18px;
  margin-bottom: 8px;
  color: #344b42;
  font-weight: 500;
}

.tloc-rg-alert {
  margin: 16px 0 0;
  border: 1px solid rgba(154, 53, 46, 0.25);
  border-radius: 12px;
  background: #fff4f2;
  padding: 12px 14px;
  color: #8f302a;
  font-size: 0.92rem;
}

.tloc-rg-submit {
  margin-top: 18px;
  width: 100%;
  justify-content: center;
}

.tloc-rg-submit[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.tloc-rg-test-note {
  margin: 10px 0 0;
  text-align: center;
  color: #7a5d19;
  font-size: 0.82rem;
  font-weight: 700;
}

.tloc-rg-return {
  margin: 0 0 28px;
  padding: 24px 26px;
  border-radius: 18px;
  border: 1px solid rgba(21, 91, 70, 0.14);
  background: #f7faf8;
}

.tloc-rg-return h2 {
  margin: 5px 0 7px;
  color: #155b46;
}

.tloc-rg-return p {
  margin: 0;
}

.tloc-rg-return__ref {
  margin-top: 12px;
  color: #5b665f;
  font-size: 0.86rem;
}

.tloc-rg-return.is-success {
  border-color: rgba(21, 91, 70, 0.28);
  background: #eef8f3;
}

.tloc-rg-return.is-failed {
  border-color: rgba(154, 53, 46, 0.22);
  background: #fff5f3;
}

.tloc-rg-return.is-failed h2 {
  color: #8f302a;
}

.tloc-rg-return.is-pending {
  border-color: rgba(201, 155, 46, 0.28);
  background: #fffaf0;
}

@media (max-width: 820px) {
  .tloc-rg-body {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .tloc-rg-grid {
    grid-template-columns: 1fr;
  }

  .tloc-rg-grid__wide {
    grid-column: auto;
  }

  .tloc-rg-purpose label {
    display: flex;
    margin-right: 0;
  }
}

/* v0.2 Embedded Checkout */
.tloc-rg-embed-stage[hidden] {
  display: none !important;
}

.tloc-rg-embed-stage {
  border: 1px solid rgba(21, 91, 70, 0.16);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.tloc-rg-embed-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.tloc-rg-embed-head span,
.tloc-rg-embed-head strong {
  display: block;
}

.tloc-rg-embed-head span {
  color: #155b46;
  font-weight: 800;
}

.tloc-rg-embed-head strong {
  margin-top: 3px;
  color: #65746d;
  font-size: 0.82rem;
  font-weight: 600;
}

.tloc-rg-status {
  margin-bottom: 14px;
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid rgba(21, 91, 70, 0.12);
  background: #f7faf8;
  color: #345247;
}

.tloc-rg-status.is-loading,
.tloc-rg-status.is-pending {
  border-color: rgba(201, 155, 46, 0.25);
  background: #fffaf0;
  color: #745918;
}

.tloc-rg-status.is-success {
  border-color: rgba(21, 91, 70, 0.25);
  background: #eef8f3;
  color: #155b46;
  font-weight: 700;
}

.tloc-rg-status.is-error {
  border-color: rgba(154, 53, 46, 0.22);
  background: #fff5f3;
  color: #8f302a;
}

.tloc-rg-embedded-checkout {
  min-height: 140px;
}

.tloc-rg-embedded-checkout iframe {
  width: 100% !important;
  max-width: 100%;
  border: 0;
  border-radius: 12px;
}

.tloc-rg-sandbox-detail {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffaf0;
  color: #745918;
  font-size: 0.82rem;
}

.tloc-rg-check-status {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .tloc-rg-embed-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
