/* TPT Auto Sync - Scoped Styles - Only applies within .tpt-auto-sync-wrapper */
.tpt-auto-sync-wrapper .page {
  /* min-height: 100vh; */
  padding-top: 30px;
  padding-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card */
.tpt-auto-sync-wrapper .card {
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03), 0 1px 3px rgba(16, 24, 40, 0.06);
  width: calc(100% - 32px);
  margin: 0 0px;
  position: relative;
  overflow: visible;
}

.tpt-auto-sync-wrapper .inner-card {
  padding: clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px);
  overflow: visible;
}

.tpt-auto-sync-wrapper .card-title {
  margin: 0 0 6px 0;
  font-size: clamp(18px, 2.4vw, 20px);
  line-height: clamp(26px, 4vw, 32px);
  font-weight: 700;
}

.tpt-auto-sync-wrapper .card-sub {
  margin: 0 0 18px 0;
  font-size: clamp(13px, 2.2vw, 14px);
  line-height: 22px;
  color: lab(44.32 0 0);
}

/* Form grid */
.tpt-auto-sync-wrapper .form {
  margin: 0;
  overflow: visible;
}

.tpt-auto-sync-wrapper .row {
  display: flex;
  gap: 5px;
  margin-bottom: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
  position: relative;
}

.tpt-auto-sync-wrapper .row-3 > .field {
  width: calc((100% - 32px) / 3);
}

.tpt-auto-sync-wrapper .row-4 > .field,
.tpt-auto-sync-wrapper .row-4 > .field-time-zome {
  width: calc((100% - 15px) / 4);
  flex: 0 0 calc((100% - 15px) / 4);
}

/* Make the first row slightly tighter */
.tpt-auto-sync-wrapper .form .row-4 {
  margin-top: 16px;
}

/* Allow items to shrink to fit 4-up without wrapping */
.tpt-auto-sync-wrapper .row-4 > .field,
.tpt-auto-sync-wrapper .row-4 > .field-time-zome {
  min-width: 0;
}

.tpt-auto-sync-wrapper .field {
  display: flex;
  flex-direction: column;
}

.tpt-auto-sync-wrapper .label {
  font-size: 14px;
  line-height: 20px;
  color: #0f172a;
  margin-bottom: 6px;
  font-weight: 600;
}

.tpt-auto-sync-wrapper .field-time-zome {
  display: inline-grid;
  position: relative;
}

.tpt-auto-sync-wrapper .input {
  height: 37px;
  padding: 4px 14px;
  border: 1px solid lab(88.4 0 0.0000119209);
  border-radius: 8px;
  background: #ffffff;
  font-size: 15px;
  line-height: 22px;
  color: lab(44.32 0 0);
  outline: none;
}

.tpt-auto-sync-wrapper .input::placeholder {
  color: #9ca3af;
}

.tpt-auto-sync-wrapper .input:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

/* Select consistency */
.tpt-auto-sync-wrapper .select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 16px;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 10px;
}

/* Upload section */
.tpt-auto-sync-wrapper .upload-wrap {
  width: 100%;
  margin: auto;
  position: relative;
}

.tpt-auto-sync-wrapper .manual-review-toggle {
  margin-top: 8px;
  margin-bottom: 10px;
}

.tpt-auto-sync-wrapper .manual-review-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.tpt-auto-sync-wrapper .manual-review-label input[type="checkbox"] {
  margin-top: 4px;
}

/* Validation Message Styles */
.tpt-auto-sync-wrapper .validation-message {
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.tpt-auto-sync-wrapper .upload-head {
  display: flex;
  align-items: center;

  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tpt-auto-sync-wrapper .tpt-popup-link {
  display: flex;
  align-items: center;

  padding: 3px;
  gap: 5px;
  font-size: 14px;
  color: #1447e6;
  text-decoration: none;
  font-weight: 700;
}

.tpt-auto-sync-wrapper span.question-mark {
  color: #1447e6;
  border: 1px solid #1447e6;
  border-radius: 50%;
  display: block;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Help Tooltip */
.tpt-auto-sync-wrapper .help-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}

.tpt-auto-sync-wrapper .help-tooltip:hover .question-mark {
  background: #1447e6;
  color: white;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

/* Tooltip bubble */
.tpt-auto-sync-wrapper .help-tooltip::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  width: 220px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.tpt-auto-sync-wrapper .help-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

/* Show tooltip on hover */
.tpt-auto-sync-wrapper .help-tooltip:hover::after,
.tpt-auto-sync-wrapper .help-tooltip:hover::before {
  opacity: 1;
}

/* Also show tooltip when explicitly activated (for touch devices) */
.tpt-auto-sync-wrapper .help-tooltip.is-active::after,
.tpt-auto-sync-wrapper .help-tooltip.is-active::before {
  opacity: 1;
}

/* Slightly compress fields and spacing just before tablet to keep 4-up */
@media (max-width: 1140px) and (min-width: 941px) {
  .tpt-auto-sync-wrapper .row {
    gap: 5px;
  }
  .tpt-auto-sync-wrapper .row-4 > .field,
  .tpt-auto-sync-wrapper .row-4 > .field-time-zome {
    width: calc((100% - 15px) / 4);
    flex: 0 0 calc((100% - 15px) / 4);
  }
  .tpt-auto-sync-wrapper .label {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .tpt-auto-sync-wrapper .input {
    height: 34px;
    padding: 3px 12px;
    font-size: 14px;
  }
  .tpt-auto-sync-wrapper .select2-container--default .select2-selection--single {
    height: 34px !important;
    padding: 3px 12px !important;
  }
  .tpt-auto-sync-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 28px !important;
    font-size: 14px;
  }
  .tpt-auto-sync-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    right: 12px !important;
  }
}

.tpt-auto-sync-wrapper .tpt-popup-link:hover {
  text-decoration: underline;
}

.tpt-auto-sync-wrapper .dropzone {
  position: relative;
  height: 120px;
  border: 2px dashed #d4d4d8;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  margin: auto;
  width: 100%;
  max-width: 668px;
  gap: 0px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.tpt-auto-sync-wrapper .dropzone:hover {
  border-color: #bdbdbf;
}

.tpt-auto-sync-wrapper .dropzone:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: #f7fbff;
}

.tpt-auto-sync-wrapper .dropzone.is-hover {
  border-color: #60a5fa;
  background: #eef6ff;
}

.tpt-auto-sync-wrapper .dropzone.is-selected {
  border-color: #16a34a;
  background: #f0fff4;
  border-style: dashed;
  border-width: 2px;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.2);
}

.tpt-auto-sync-wrapper .selected-info {
  text-align: center;
  color: #16a34a;
}

.tpt-auto-sync-wrapper .selected-info .selected-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 6px;
  color: #16a34a;
}

.tpt-auto-sync-wrapper .selected-info .filename {
  font-weight: 500;
  font-size: 14px;
  color: #15803d;
}

.tpt-auto-sync-wrapper .selected-info .change-hint {
  font-size: 12px;
  color: #6b7280;
}

.tpt-auto-sync-wrapper .file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.tpt-auto-sync-wrapper .cloud {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpt-auto-sync-wrapper .cloud svg {
  height: 60px;
  width: 60px;
  color: lightgray;
}

.tpt-auto-sync-wrapper .dz-text {
  text-align: center;
}

.tpt-auto-sync-wrapper .dz-main {
  font-size: 14px;
  color: #52525b;
}

.tpt-auto-sync-wrapper .dz-sub {
  font-size: 12px;
  color: #a1a1aa;
  margin-top: 2px;
}

/* Actions */
.tpt-auto-sync-wrapper .actions {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  margin-bottom: 22px;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Keep helper text on one line and allow truncation so button stays visible */
.tpt-auto-sync-wrapper p.upload-get {
  color: lab(44.32 0 0);
  font-size: 14px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.tpt-auto-sync-wrapper .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: clamp(6px, 1.4vw, 10px) clamp(14px, 2.6vw, 20px);
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  border-radius: 8px;
  font-size: clamp(14px, 2.4vw, 18px);
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.tpt-auto-sync-wrapper .btn:hover {
  background: #111827;
  color: #ffffff;
}

.tpt-auto-sync-wrapper .btn-icon {
  display: inline-flex;
  width: clamp(16px, 2.2vw, 18px);
  height: clamp(16px, 2.2vw, 18px);
}

/* Note */
.tpt-auto-sync-wrapper .note {
  display: flex;
  gap: 12px;
  background: lab(98.6846 -1.79055 9.7766);
  border: 1px solid lab(94.3433 -5.00429 52.9663);
  color: #78350f;
  border-radius: 12px;
  padding: 16px 18px;
}

.tpt-auto-sync-wrapper .note-icon {
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid #f59e0b;
  color: #b45309;
  font-weight: 700;
  padding: 0px 8px;
  font-size: 13px;
  background: #fff;
}

.tpt-auto-sync-wrapper .note-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 14px;
}

.tpt-auto-sync-wrapper .note-text {
  font-size: 13px;
  line-height: 20px;
}

.tpt-auto-sync-wrapper .tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: white;
  color: rgb(31, 30, 30);
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 12px;
}

/* Submission snapshot (after submit) */
.tpt-auto-sync-wrapper .submission-snapshot {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.tpt-auto-sync-wrapper .snapshot-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.tpt-auto-sync-wrapper .snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.tpt-auto-sync-wrapper .snapshot-item {
  min-width: 0;
}

.tpt-auto-sync-wrapper .snapshot-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 2px;
}

.tpt-auto-sync-wrapper .snapshot-value {
  font-size: 14px;
  color: #111827;
  word-break: break-word;
}

.tpt-auto-sync-wrapper .snapshot-value a {
  color: #1447e6;
  text-decoration: none;
  font-weight: 600;
}

.tpt-auto-sync-wrapper .snapshot-value a:hover {
  text-decoration: underline;
}

.tpt-auto-sync-wrapper .snapshot-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.tpt-auto-sync-wrapper .snapshot-btn {
  text-decoration: none;
}

.tpt-auto-sync-wrapper .snapshot-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 10px 0 8px 0;
}

.tpt-auto-sync-wrapper .snapshot-block:first-of-type .snapshot-subtitle {
  margin-top: 0;
}

.tpt-auto-sync-wrapper .snapshot-block + .snapshot-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.tpt-auto-sync-wrapper .snapshot-note {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

.tpt-auto-sync-wrapper .muted {
  color: #9ca3af;
}

@media (max-width: 640px) {
  .tpt-auto-sync-wrapper .snapshot-grid {
    grid-template-columns: 1fr;
  }
}

/* Modal (Where to find?) - Scoped within wrapper */
.tpt-auto-sync-wrapper .modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}

.tpt-auto-sync-wrapper .modal:target {
  display: block;
}

.tpt-auto-sync-wrapper .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.tpt-auto-sync-wrapper .modal-card {
  position: relative;
  width: 512px;
  max-width: calc(100% - 32px);
  max-height: 506px;
  margin: 7vh auto 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.tpt-auto-sync-wrapper .modal-close {
  position: absolute;
  top: 8px;
  right: 20px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.tpt-auto-sync-wrapper .modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.tpt-auto-sync-wrapper .modal-body {
  padding: 18px 18px 16px 18px;
  overflow: auto;
  max-height: 506px;
}

.tpt-auto-sync-wrapper .modal-heading {
  margin: 0 0 6px 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
  color: #0f172a;
}

.tpt-auto-sync-wrapper .modal-desc {
  margin: 0 0 12px 0;
  font-size: 13px;
  line-height: 22px;
  color: #475569;
}

/* Steps */
.tpt-auto-sync-wrapper .modal-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tpt-auto-sync-wrapper .modal-steps > li {
  display: flex;
  gap: 12px;
}

.tpt-auto-sync-wrapper .bullet {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 24%;
  border: 2px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #5b21b6;
}

.tpt-auto-sync-wrapper .bullet-red {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.tpt-auto-sync-wrapper .bullet-navy {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #1e3a8a;
}

.tpt-auto-sync-wrapper .bullet-blue {
  border-color: #60a5fa;
  background-color: #60a5fa;
}

.tpt-auto-sync-wrapper .bullet-empty {
  border-radius: 4px;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
}

.tpt-auto-sync-wrapper .bullet-purple {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.tpt-auto-sync-wrapper .step {
  flex: 1;
}

.tpt-auto-sync-wrapper .step-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.tpt-auto-sync-wrapper .step-list {
  margin: 0;
  padding-left: 18px;
  color: #475569;
}

.tpt-auto-sync-wrapper .step-list li {
  margin-bottom: 4px;
  line-height: 20px;
  font-size: 13px;
}

.tpt-auto-sync-wrapper .step-image {
  margin-top: 16px;
  margin-bottom: 8px;
}

.tpt-auto-sync-wrapper .step-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tip */
.tpt-auto-sync-wrapper .tip {
  margin-top: 8px;
  padding: 14px;
  background: #f0f7ff;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  color: #1e3a8a;
  display: flex;
  font-size: 13px;
  margin-bottom: 30px;
  gap: 8px;
}

.tpt-auto-sync-wrapper .tip-title {
  font-weight: 700;
}

.tpt-auto-sync-wrapper .tip-text {
  flex: 1;
}

.tpt-auto-sync-wrapper .btn span {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hidden utility */
.tpt-auto-sync-wrapper .hidden {
  display: none !important;
}

/* Status view */
.tpt-auto-sync-wrapper .status-block {
  margin-top: 36px;
}

.tpt-auto-sync-wrapper .status-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #111827;
}

.tpt-auto-sync-wrapper .status-steps {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tpt-auto-sync-wrapper .status-steps .step-line {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.tpt-auto-sync-wrapper .status-steps .step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
}

.tpt-auto-sync-wrapper .step-asc {
  padding: 5px;
  background-color: lab(96.1861 -13.8464 6.52365);
  display: flex;
  border-radius: 50%;
}

.tpt-auto-sync-wrapper .status-steps .step-item .step-icon {
  width: 21px;
  height: 21px;
  font-size: 25px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  display: inline-block;
  position: relative;
}

.tpt-auto-sync-wrapper .status-steps .step-item.is-active {
  color: black;
  font-size: 16px;
  font-weight: 600;
}

.tpt-auto-sync-wrapper .status-steps .step-item.is-active .step-icon {
  border-color: #06fa80;
  background: lab(96.1861 -13.8464 6.52365);
}

.tpt-auto-sync-wrapper .status-steps .step-item.is-active .step-icon::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #22c55e;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center/contain no-repeat;
}

/* Rejected State Styles */
.tpt-auto-sync-wrapper .status-steps .step-item.is-rejected {
  color: #dc2626;
  font-size: 16px;
  font-weight: 600;
}

.tpt-auto-sync-wrapper .status-steps .step-item.is-rejected .step-icon {
  border-color: #ef4444;
  background: #fef2f2;
}

.tpt-auto-sync-wrapper .status-steps .step-item.is-rejected .step-icon::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  font-size: 16px;
  font-weight: 700;
}

/* Rejection Alert Box */
.tpt-auto-sync-wrapper .rejection-alert {
  margin-top: 24px;
  padding: 20px;
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: 12px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tpt-auto-sync-wrapper .rejection-icon {
  width: 40px;
  height: 40px;
  background: #dc2626;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.tpt-auto-sync-wrapper .rejection-content {
  flex: 1;
}

.tpt-auto-sync-wrapper .rejection-title {
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 8px;
}

.tpt-auto-sync-wrapper .rejection-message {
  font-size: 15px;
  line-height: 1.6;
  color: #991b1b;
}

.tpt-auto-sync-wrapper .synced-note {
  margin-top: 18px;
  padding: 14px;
  font-size: 14px;
  background: #ecfdf5;
  border: lab(92.4222 -26.4702 12.9427);
  color: lab(27.1134 -0.956401 -12.3224);
  border-radius: 5px;
  line-height: 20px;
}

/* Notes for each state */
.tpt-auto-sync-wrapper .status-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
}

.tpt-auto-sync-wrapper .status-note.note-pending {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.tpt-auto-sync-wrapper .status-note.note-verified {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* Spinner animation */
@keyframes tpt-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Show yellow spinner for the current step while loading */
.tpt-auto-sync-wrapper .status-block.state-pending .step-item[data-step="pending"] .step-icon {
  border-color: #facc15;
  background: #fffbeb;
}

.tpt-auto-sync-wrapper .status-block.state-pending .step-item[data-step="pending"] .step-icon::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 2px solid #facc15;
  border-top-color: transparent;
  border-radius: 50%;
  animation: tpt-spin 1s linear infinite;
  background: transparent;
  mask: none;
}

.tpt-auto-sync-wrapper .status-block.state-verified .step-item[data-step="verified"] .step-icon {
  border-color: #facc15;
  background: #fffbeb;
}

.tpt-auto-sync-wrapper .status-block.state-verified .step-item[data-step="verified"] .step-icon::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 2px solid #facc15;
  border-top-color: transparent;
  border-radius: 50%;
  animation: tpt-spin 1s linear infinite;
  background: transparent;
  mask: none;
}

/* Responsive: tablet = 2 columns, phone = 1 column */
@media (max-width: 940px) {
  .tpt-auto-sync-wrapper .row-3 {
    flex-wrap: wrap;
  }

  .tpt-auto-sync-wrapper .row-3 > .field {
    width: calc((100% - 16px) / 2);
  }

  .tpt-auto-sync-wrapper .row-4 {
    flex-wrap: wrap;
  }

  .tpt-auto-sync-wrapper .row-4 > .field,
  .tpt-auto-sync-wrapper .row-4 > .field-time-zome {
    width: calc((100% - 16px) / 2);
  }

  .tpt-auto-sync-wrapper .actions {
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .tpt-auto-sync-wrapper .field-time-zome {
    display: inline-grid;
    width: 100% !important;
  }
}

/* Small screens: keep actions on one row; allow text to shrink space */
@media (max-width: 640px) {
  .tpt-auto-sync-wrapper button{
    width: 100%;
    display: flex;
    text-align: center;
    justify-content: center;
    height: 48px;
  }

  .tpt-auto-sync-wrapper .actions{
    flex-wrap: wrap !important;
  }

  .tpt-auto-sync-wrapper p.upload-get {
    font-size: 12px;
    overflow: visible;
    text-overflow: initial;
    white-space: wrap;
  }

  .tpt-auto-sync-wrapper .row {
    margin-top: 20px;
    gap: 12px;
  }

  .tpt-auto-sync-wrapper .row-3 > .field {
    width: 100%;
    flex: 1 1 100%;
  }

  .tpt-auto-sync-wrapper .row-4 > .field,
  .tpt-auto-sync-wrapper .row-4 > .field-time-zome {
    width: 100%;
    flex: 1 1 100%;   /* THIS is what fixes the mobile layout */
  }

  .tpt-auto-sync-wrapper .actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .tpt-auto-sync-wrapper p.upload-get {
    text-align: left;
  }

  .tpt-auto-sync-wrapper .upload-head {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Very small screens: tighten paddings and modal sizing */
@media (max-width: 400px) {
  .tpt-auto-sync-wrapper .inner-card {
    padding: 14px;
  }

  .tpt-auto-sync-wrapper .modal-card {
    width: calc(100% - 24px);
    max-height: calc(100vh - 14vh);
    margin: 7vh auto 0 auto;
  }
}

@media (max-width: 420px) {
  .tpt-auto-sync-wrapper .status-steps {
    display: flex;
    align-items: center;
    gap: 6px;
  }
}

@media screen and (min-width: 275px) and (max-width: 340px) {
  .tpt-auto-sync-wrapper .status-steps {
    display: flex;
    align-items: start;
    gap: 3px;
    flex-direction: column;
  }

  .tpt-auto-sync-wrapper .status-steps .step-item.is-active {
    color: black;
    font-size: 14px;
    font-weight: 600;
  }

  .tpt-auto-sync-wrapper .status-steps .step-item .step-icon {
    width: 18px;
    height: 18px;
    font-size: 25px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    display: inline-block;
    position: relative;
  }
}

/* Mobile responsiveness for Sync Status */
@media (max-width: 600px) {
  .tpt-auto-sync-wrapper .status-block {
    margin-top: 28px;
  }

  .tpt-auto-sync-wrapper .status-title {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .tpt-auto-sync-wrapper .status-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tpt-auto-sync-wrapper .status-steps .step-item {
    gap: 10px;
  }

  .tpt-auto-sync-wrapper .status-steps .step-line {
    width: 1px;
    height: 18px;
    flex: none;
    align-self: stretch;
  }

  .tpt-auto-sync-wrapper .status-steps .step-item .step-icon {
    width: 18px;
    height: 18px;
  }

  .tpt-auto-sync-wrapper .status-steps .step-item.is-active {
    font-size: 14px;
  }

  .tpt-auto-sync-wrapper .status-note,
  .tpt-auto-sync-wrapper .synced-note {
    font-size: 13px;
    line-height: 19px;
  }

  .tpt-auto-sync-wrapper .rejection-alert {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .tpt-auto-sync-wrapper .rejection-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .tpt-auto-sync-wrapper .rejection-title {
    font-size: 16px;
  }

  .tpt-auto-sync-wrapper .rejection-message {
    font-size: 14px;
  }

  .tpt-auto-sync-wrapper .validation-message {
    font-size: 13px;
    padding: 10px 12px;
    gap: 8px;
  }

  .tpt-auto-sync-wrapper .validation-message span:first-child {
    font-size: 18px;
  }

  /* Adjust tooltip for mobile */
  .tpt-auto-sync-wrapper .help-tooltip::after {
    width: 180px;
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Make question mark easier to tap on mobile */
  .tpt-auto-sync-wrapper span.question-mark {
    width: 16px;
    height: 16px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .tpt-auto-sync-wrapper .status-steps .step-item .step-icon {
    width: 16px;
    height: 16px;
  }

  .tpt-auto-sync-wrapper .status-steps {
    gap: 8px;
  }
}

/* When fully synced, green checks are already shown by .is-active rules */

/* Select2 Custom Styles - Scoped within .tpt-auto-sync-wrapper */
/* Match exact styling of regular input fields */
.tpt-auto-sync-wrapper .select2-container {
  font-size: 15px;
}

.tpt-auto-sync-wrapper .select2-container--default .select2-selection--single {
  height: 37px !important;
  padding: 4px 14px !important;
  border: 1px solid lab(88.4 0 0.0000119209) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  line-height: 22px !important;
  display: flex;
  align-items: center;
}

.tpt-auto-sync-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: lab(44.32 0 0) !important;
  line-height: 22px !important;
  padding-left: 0 !important;
  padding-right: 30px !important;
  font-size: 15px;
  font-weight: 400;
}

.tpt-auto-sync-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af !important;
  font-size: 15px;
  font-weight: 400;
}

.tpt-auto-sync-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 37px !important;
  right: 14px !important;
  top: 0 !important;
  display: flex;
  align-items: center;
}

.tpt-auto-sync-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #94a3b8 transparent transparent transparent;
  border-width: 5px 4px 0 4px;
  margin-left: -4px;
  margin-top: 0;
}

.tpt-auto-sync-wrapper .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent #94a3b8 transparent;
  border-width: 0 4px 5px 4px;
  margin-top: 0;
}

.tpt-auto-sync-wrapper .select2-container--default.select2-container--focus .select2-selection--single,
.tpt-auto-sync-wrapper .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08) !important;
  outline: none;
}

/* Hover state to match input fields */
.tpt-auto-sync-wrapper .select2-container--default .select2-selection--single:hover {
  border-color: #94a3b8 !important;
}

/* Dropdown styles */
.select2-container--default .tpt-timezone-dropdown {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
}

.select2-container--default .tpt-timezone-dropdown .select2-search--dropdown {
  padding: 12px 12px 8px 12px;
  background: #fff;
  border-radius: 8px 8px 0 0;
}

.select2-container--default .tpt-timezone-dropdown .select2-search__field {
  border: 1px solid #d1d5db !important;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  color: #374151;
}

.select2-container--default .tpt-timezone-dropdown .select2-search__field::placeholder {
  color: #9ca3af;
  font-size: 14px;
}

.select2-container--default .tpt-timezone-dropdown .select2-search__field:focus {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

.select2-container--default .tpt-timezone-dropdown .select2-results__options {
  max-height: 280px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__option {
  padding: 10px 14px;
  font-size: 14px;
  color: #374151;
  transition: background-color 120ms ease, color 120ms ease;
  cursor: pointer;
  line-height: 20px;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__option--highlighted[aria-selected] {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__option[aria-selected=true] {
  background-color: #eff6ff;
  color: #1e40af;
  font-weight: 500;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__option[aria-selected=true].select2-results__option--highlighted {
  background-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 500;
}

/* Scrollbar styling for dropdown */
.select2-container--default .tpt-timezone-dropdown .select2-results__options::-webkit-scrollbar {
  width: 8px;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__options::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__options::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.select2-container--default .tpt-timezone-dropdown .select2-results__options::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Loading state */
.select2-container--default .tpt-timezone-dropdown .select2-results__message {
  padding: 8px 14px;
  color: #6b7280;
  font-size: 14px;
  
}

/* Empty results message */
.select2-container--default .tpt-timezone-dropdown .select2-results__message {
  padding: 12px 14px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

/* Remove focus outline on container */
.tpt-auto-sync-wrapper .select2-container--default.select2-container--open {
  outline: none;
}

/* Ensure dropdown appears above other elements */
.select2-container--default .tpt-timezone-dropdown {
  z-index: 9999 !important;
}

/* Ensure Select2 container has proper z-index when open */
.tpt-auto-sync-wrapper .select2-container--open {
  z-index: 9999;
}

/* Responsive adjustments for select2 */
@media (max-width: 640px) {
  .tpt-auto-sync-wrapper .select2-container--default .select2-selection--single {
    font-size: 14px;
  }
  
  .select2-container--default .tpt-timezone-dropdown .select2-results__option {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .select2-container--default .tpt-timezone-dropdown .select2-search__field {
    font-size: 14px;
    padding: 8px 10px;
  }
}

.tpt-auto-sync-wrapper .field-time-zome  {
  width: auto; /* keep 4-up layout controlled by .row-4 widths */
}

header{
  position: relative;
  z-index: 9999;
}

.upload-head .label{
  margin-bottom: 0px;
}


