input.cayman-gateway-ccNumber,
input.cayman-gateway-expiry,
input.cayman-gateway-cvc {
  width: 100%;
}
.cg-payment-form-note {
  font-style: italic;
}
#cg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
}
#cg-modal {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(6px);
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}
#cg-modal #cg-modal-content {
  padding: 0 15px;
}
#cg-modal .card-title {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding: 15px 0;
  margin-top: 0;
}
#cg-modal .cg-field-group {
  display: flex;
  width: 100%;
  font-size: 16px;
  margin-bottom: 15px;
}
#cg-modal .cg-label {
  flex: 1;
  padding-right: 10px;
}
#cg-modal .cg-field {
  flex: 2;
}
#cg-modal input {
  padding: 5px 10px;
}
#cg-pay-btn,
#cg-pay-cancel-btn {
  margin-right: 10px;
}
#cg-modal .cg-error {
  color: red;
  font-size: 13px;
  font-style: italic;
}
#cg-modal .is-invalid {
  border: 1px solid red;
}
.cg-form-error {
  text-align: center;
  margin-bottom: 10px;
  color: red;
  font-size: 14px;
}
.cg-gateway-payment-confirmation {
  text-align: center;
  padding: 50px 0;
}
.cg-spinner {
  width: 30px;
  height: 30px;
  border: 6px solid #eee;
  border-top: 6px solid #0073aa;
  border-radius: 50%;
  animation: cg-spin 1s linear infinite;
}
.cg-spinner-container {
  display: flex;
  justify-content: center;
}

@keyframes cg-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.cg-standard-button {
  background-color: #0095da;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}
.cg-pay-btn-spinner {
  width: 10px;
  height: 10px;
  border-width: 3px;
}
/* Hover effect */
.cg-standard-button:hover {
  background-color: #007bb5;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

/* Click effect */
.cg-standard-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Disabled state */
.cg-standard-button:disabled {
  background-color: #8cc9e6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Subscription */
.cg-subscription-row {
  margin: 30px 0;
}
.cg-subscription-row .cg-subscription-title {
  margin-bottom: 5px;
  font-weight: bold;
}
.cg-subscription-row .cg-payment-mode-row {
  display: flex;
  margin-bottom: 10px;
}
.cg-subscription-row .cg-payment-mode-row .cg-subscription-choice {
  margin-right: 10px;
}
.cg-subscription-row .cg-subscription-option-block {
  display: flex;
}
.cg-subscription-row .cg-subscription-option-block .cg-subscription-option {
  margin-right: 10px;
}
.cg-subscription-row .cg-subscription-options-row h3 {
  font-weight: bold;
  margin-bottom: 5px;
}

/* ── Wrapper ──────────────────────────────────────────────────────── */
.cg-wrap {
  padding: 0 20px 40px;
}
.cg-summary {
  color: #646970;
  margin: 8px 0 12px;
}

/* ── Table column widths ──────────────────────────────────────────── */
.cg-table .cg-col-id {
  width: 55px;
}
.cg-table .cg-col-guid,
.cg-table .cg-col-txnid {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Status badges ────────────────────────────────────────────────── */
.cg-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}
.cg-status--active {
  background: #d1fae5;
  color: #065f46;
}
.cg-status--pending {
  background: #fef9c3;
  color: #713f12;
}
.cg-status--expired,
.cg-status--cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.cg-status--paused {
  background: #e0e7ff;
  color: #3730a3;
}
/* Catch-all for any unlisted status value */
.cg-status:not([class*="cg-status--"]) {
  background: #f3f4f6;
  color: #374151;
}

/* ── Empty state ──────────────────────────────────────────────────── */
.cg-empty {
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  color: #646970;
}

/* ── Pagination ───────────────────────────────────────────────────── */
.cg-pagination {
  margin-top: 12px;
}

.cg-pagination .pagination-links .button {
  margin: 0 1px;
  min-width: 32px;
  text-align: center;
}
.cg-pagination .pagination-links .button.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.cg-pagination .cg-current-page {
  font-weight: 700;
}

.cg-subscription-options-field {
  display: none;
}

/* ============================================
   Subscription Filters Styling
   ============================================ */

.cg-filters-wrapper {
  background: #fff;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.cg-filters-form {
  margin: 0;
}

.cg-filters-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Left Side: Search Bar */
.cg-filter-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 300px;
}

.cg-search-input {
  flex: 1;
  max-width: 400px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 14px;
}

.cg-search-input:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

/* Right Side: FilterButtons */
.cg-filter-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cg-toggle-filters {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cg-toggle-filters .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Expandable Filters Panel */
.cg-filters-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dcdcde;
}

.cg-filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.cg-filter-field label {
  font-weight: 600;
  font-size: 13px;
  color: #1d2327;
  margin: 0;
  display: inline-block;
  width: 100%;
  margin-bottom: 6px;
}

/* Date Range Fields */
.cg-filter-field--date-range {
  grid-column: span 1;
}

.cg-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cg-date-range input {
  flex: 1;
}

.cg-date-separator {
  color: #8c8f94;
  font-weight: 600;
  flex-shrink: 0;
}

/* Filter Actions */
.cg-filters-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f1;
}

/* Summary Text */
.cg-summary {
  margin: 16px 0;
  font-size: 14px;
  color: #50575e;
}

/* Empty State */
.cg-empty {
  padding: 40px;
  text-align: center;
  background: #f6f7f7;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  color: #646970;
  font-size: 14px;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
  .cg-filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cg-filter-left {
    min-width: 100%;
  }

  .cg-search-input {
    max-width: none;
  }

  .cg-filter-right {
    width: 100%;
    justify-content: space-between;
  }

  .cg-filters-grid {
    grid-template-columns: 1fr;
  }

  .cg-date-range {
    flex-direction: column;
    align-items: stretch;
  }

  .cg-date-separator {
    display: none;
  }

  .cg-filters-actions {
    flex-direction: column;
  }

  .cg-filters-actions .button {
    width: 100%;
    text-align: center;
  }
}

@media screen and (max-width: 600px) {
  .cg-filters-wrapper {
    padding: 12px;
  }

  .cg-filter-left {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .cg-filter-left .button {
    width: 100%;
  }
}

.cg_subscription_option td {
  padding: 8px !important;
}

.cg_subscription_option select {
  width: 100% !important;
}

.cg-subscription-row {
  margin-top: 20px;
}

.cg-subscription-title,
.cg-subscription-options-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.cg-payment-mode-row,
.cg-subscription-option-block {
  display: flex;
  gap: 12px;
}

.cg-mode-button,
.cg-subscription-option {
  display: block;
  position: relative;
  margin: 0;
  cursor: pointer;
}

.cg-mode-button input[type="radio"],
.cg-subscription-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cg-mode-button-content,
.cg-subscription-option-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #fff;
  color: #222;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.cg-mode-button:hover .cg-mode-button-content,
.cg-subscription-option:hover .cg-subscription-option-content {
  border-color: #777;
  background: #f7f7f7;
}

.cg-mode-button input[type="radio"]:checked + .cg-mode-button-content,
.cg-subscription-option
  input[type="radio"]:checked
  + .cg-subscription-option-content {
  border-color: #111;
  background: #f2f2f2;
  color: #111;
  font-weight: 600;
}

.cg-subscription-option-label {
  font-size: 14px;
  line-height: 1.4;
}

.cg-discount-badge {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid #888;
  border-radius: 999px;
  background: #efefef;
  color: #222;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cg-subscription-option-has-discount .cg-subscription-option-content {
  border-color: #999;
}

@media (max-width: 600px) {
  .cg-mode-button-content,
  .cg-subscription-option-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cg-discount-badge {
    margin-top: 4px;
  }
}

/* Confirmation page styles */
.cg-gateway-payment-confirmation {
  text-align: center;
  padding: 50px;
  font-family: sans-serif;
}

.cg-gateway-payment-confirmation  .cg-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: cg-gateway-confirm-page-spin 2s linear infinite;
  margin: 20px auto;
}

@keyframes cg-gateway-confirm-page-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Failed page styles */
.cg-gateway-failed-container {
  max-width: 600px;
  margin: 100px auto;
  text-align: center;
  padding: 40px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cg-gateway-failed-container .cg-page-title {
  color: #d9534f;
  font-size: 24px;
}

.cg-gateway-failed-container .cg-button {
  display: inline-block;
  background: #007cba;
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 20px;
  transition: background 0.2s;
}

.cg-gateway-failed-container .cg-button:hover {
  background: #006799;
  color: #fff;
}

.cg-gateway-failed-container .error-icon {
  font-size: 50px;
  color: #d9534f;
  margin-bottom: 10px;
}
