:root {
  --tcmp-bg: #ffffff;
  --tcmp-bg-soft: #fafbfc;
  --tcmp-border: #e4e7ec;
  --tcmp-border-strong: #d0d5dd;
  --tcmp-text: #101828;
  --tcmp-text-muted: #475467;
  --tcmp-primary: #3f6ddf;
  --tcmp-primary-hover: #345ec0;
}

.tcmp-builder-card {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--tcmp-border);
  border-radius: 8px;
  background: var(--tcmp-bg);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

[data-tcmp-hidden="1"] {
  display: none !important;
}

.tcmp-native-pricing-host {
  margin: 0 0 16px;
}

.tcmp-bundle-builder-host {
  width: 100%;
  max-width: 100%;
  margin: 10px 0 14px;
  margin-left: 0;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.tcmp-bundle-multi-plan-root {
  width: 100%;
}

/* Bundle pricing panel is a narrow right column, force a compact single-column editor there. */
.tcmp-bundle-builder-host .tcmp-builder-card {
  margin-top: 0;
  padding: 16px;
  border-radius: 10px;
  box-shadow: none;
}

.tcmp-bundle-builder-host .tcmp-plan-editor-card {
  padding: 14px;
}

.tcmp-bundle-builder-host .tcmp-plan-editor-top {
  flex-direction: column;
  align-items: flex-start;
}

.tcmp-bundle-builder-host .tcmp-plan-editor-actions {
  width: 100%;
}

.tcmp-bundle-builder-host .tcmp-plan-editor-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

.tcmp-bundle-builder-host .tcmp-col-12,
.tcmp-bundle-builder-host .tcmp-col-8,
.tcmp-bundle-builder-host .tcmp-col-6,
.tcmp-bundle-builder-host .tcmp-col-4 {
  grid-column: span 1;
}

@media (max-width: 1280px) {
  .tcmp-bundle-builder-host {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 1024px) {
  .tcmp-bundle-builder-host {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

.tcmp-native-pricing-host .tcmp-builder-card {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tcmp-builder-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tcmp-builder-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.tcmp-builder-head p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
}

.tcmp-builder-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tcmp-builder-head-actions input[type="text"] {
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--tcmp-border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--tcmp-text);
  line-height: 1.4;
}

.tcmp-builder-head-actions input[type="text"]:focus {
  outline: 0;
  border-color: #b9c0cc;
  box-shadow: 0 0 0 3px rgba(63, 109, 223, 0.12);
}

.tcmp-plan-editor-list {
  display: grid;
  gap: 12px;
}

.tcmp-plan-editor-card {
  border: 1px solid var(--tcmp-border);
  border-radius: 12px;
  background: var(--tcmp-bg);
  padding: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.tcmp-plan-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tcmp-plan-editor-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tcmp-plan-editor-title {
  margin: 0;
  color: var(--tcmp-text);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
}

.tcmp-plan-editor-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.tcmp-plan-editor-grid > .tcmp-field {
  grid-column: span 12;
}

.tcmp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tcmp-col-12 { grid-column: span 12; }
.tcmp-col-8 { grid-column: span 8; }
.tcmp-col-6 { grid-column: span 6; }
.tcmp-col-4 { grid-column: span 4; }

.tcmp-field-label {
  color: #344054;
  font-size: 12px;
  font-weight: 600;
}

.tcmp-field input[type="text"],
.tcmp-field input[type="number"],
.tcmp-field select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--tcmp-border-strong);
  border-radius: 6px;
  background: var(--tcmp-bg);
  line-height: 1.4;
  text-overflow: ellipsis;
  color: var(--tcmp-text);
}

.tcmp-money-input {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--tcmp-border-strong);
  border-radius: 6px;
  background: var(--tcmp-bg);
  overflow: hidden;
}

.tcmp-money-input > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #667085;
  font-weight: 600;
  background: var(--tcmp-bg-soft);
  border-right: 1px solid var(--tcmp-border);
}

.tcmp-money-input input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.tcmp-field-checkbox {
  justify-content: flex-start;
}

.tcmp-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #344054;
}

.tcmp-empty-row {
  color: #667085;
  text-align: center;
  padding: 18px 12px;
  border: 1px dashed #d0d5dd;
  border-radius: 10px;
  background: var(--tcmp-bg-soft);
}

.tcmp-builder-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.tcmp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  color: #344054;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.3;
}

.tcmp-btn:hover {
  border-color: #c7ced8;
  color: #1d2939;
  background: #f9fafb;
}

.tcmp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tcmp-btn-primary {
  color: #fff;
  border-color: var(--tcmp-primary);
  background: var(--tcmp-primary);
}

.tcmp-btn-primary:hover {
  color: #fff;
  border-color: var(--tcmp-primary-hover);
  background: var(--tcmp-primary-hover);
}

.tcmp-btn-light {
  background: #f8fafc;
  border-color: #d9dee7;
  color: #344054;
}

.tcmp-btn-danger {
  border-color: #f0d2d5;
  color: #b42318;
}

.tcmp-btn-danger:hover {
  border-color: #f3b9bf;
  color: #912018;
  background: #fff7f7;
}

.tcmp-note,
.tcmp-notice,
.tcmp-error {
  margin: 10px 0;
  padding: 9px 10px;
  border-radius: 4px;
  font-size: 13px;
}

.tcmp-note {
  color: #475467;
  background: #f9fafb;
  border: 1px solid #eaecf0;
}

.tcmp-plan-collapsed-note {
  margin: 0;
  padding: 8px 10px;
  color: #667085;
  font-size: 13px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  background: #fafbfc;
}

.tcmp-notice {
  color: #027a48;
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
}

.tcmp-error {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.tcmp-course-plan-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.tcmp-course-plan-actions {
  margin-top: 14px;
}

.tcmp-course-plan-radio-option {
  display: block;
  margin: 0;
  cursor: pointer;
}

.tcmp-course-plan-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tcmp-course-plan-radio-option.is-disabled {
  cursor: default;
}

.tcmp-course-plan-card {
  border: 1px solid var(--tcmp-border);
  border-radius: 14px;
  background: var(--tcmp-bg);
  padding: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}

.tcmp-course-plan-radio-option:hover .tcmp-course-plan-card {
  border-color: #d5dae1;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.tcmp-course-plan-radio:checked + .tcmp-course-plan-card {
  border-color: var(--tcmp-primary);
  box-shadow: 0 0 0 2px rgba(63, 109, 223, 0.12);
}

.tcmp-course-plan-radio:disabled + .tcmp-course-plan-card {
  opacity: 0.66;
  box-shadow: none;
}

.tcmp-course-plan-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.tcmp-course-plan-title {
  margin: 0;
  color: var(--tcmp-text);
  font-size: 16px;
  line-height: 1.4;
}

.tcmp-course-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #e4e7ec;
  color: #475467;
  background: #f9fafb;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.tcmp-course-plan-price {
  margin: 12px 0 16px;
  color: var(--tcmp-text);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.tcmp-price-current .amount {
  color: var(--tcmp-text);
  font-weight: 700;
}

.tcmp-price-regular {
  margin-left: 4px;
  color: #667085;
  font-size: 16px;
  font-weight: 500;
}

.tcmp-course-plan-card .tutor-btn {
  border-radius: 10px;
  font-weight: 600;
}

.tcmp-course-plan-hint {
  font-size: 12px;
  line-height: 1.5;
  color: #667085;
}

.tcmp-loop-price,
.tcmp-loop-price > span {
  font-weight: 600;
  color: #1d2939;
}

.tcmp-loop-price-line {
  display: inline-block;
  line-height: 1.45;
}

.tcmp-loop-price-type {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  margin-right: 4px;
}

.tcmp-loop-fallback-wrap {
  display: grid;
  gap: 10px;
}

@media (max-width: 767px) {
  .tcmp-builder-card {
    padding: 14px;
  }

  .tcmp-builder-head-actions {
    width: 100%;
  }

  .tcmp-builder-head-actions input[type="text"] {
    min-width: 0;
    flex: 1;
  }

  .tcmp-plan-editor-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 10px;
  }

  .tcmp-col-12,
  .tcmp-col-8,
  .tcmp-col-6,
  .tcmp-col-4 {
    grid-column: span 1;
  }

  .tcmp-plan-editor-card {
    padding: 12px;
  }

  .tcmp-course-plan-price {
    font-size: 22px;
  }
}
