.pircel-error {
  background-color: #ffe6e6;
}

.pircel-warning {
  background-color: #fff5e6;
}

.pircel-pass {
  background-color: #e6ffed;
}

.pircel-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.5rem;
}

.pircel-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pircel-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.25s;
  border-radius: 1.5rem;
}

.pircel-slider::before {
  position: absolute;
  content: '';
  height: 1rem;
  width: 1rem;
  left: 0.25rem;
  bottom: 0.25rem;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.pircel-switch input:checked + .pircel-slider {
  background-color: #2196f3;
}

.pircel-switch input:focus + .pircel-slider {
  box-shadow: 0 0 0.0625rem #2196f3;
}

.pircel-switch input:checked + .pircel-slider::before {
  transform: translateX(1rem);
}

#woocommerce-product-data ul.wc-tabs li.pircel-tab a::before {
  content: '\e006' !important;
  /* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
  font-family: WooCommerce !important;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.pircel-size-dimensions {
  display: flex;
  gap: 10px;
}

.pircel-size-dimensions label {
  display: flex;
  align-items: center;
}

.pircel-size-dimensions input {
  width: 60px;
  margin: 0 5px;
}

.pircel-size-dimensions-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 600px;
}

.pircel-size-dimensions-table th,
.pircel-size-dimensions-table td {
  padding: 10px;
  text-align: left;
  border: 1px solid #ddd;
}

.pircel-size-dimensions-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.pircel-size-dimensions-table input[type='number'] {
  width: 100%;
  box-sizing: border-box;
}

.pircel-tools-controls {
  margin-bottom: 1em;
}

.pircel-tools-results-container {
  max-height: 300px;
  overflow: auto;
}

#pircel-tools-results table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

#pircel-tools-results th,
#pircel-tools-results td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: left;
}

.pircel-tools-controls select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* stylelint-disable selector-id-pattern */
#TB_ajaxContent {
  width: auto !important;
  height: auto !important;
}

.pircel-status {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 3px;
}

.pircel-status .dashicons {
  margin-right: 4px;
}

.pircel-status-connected {
  color: #00a32a;
  background-color: #f0f9ff;
  border: 1px solid #c3ddfd;
}

.pircel-status-pending {
  color: #b45309;
  background-color: #fffbeb;
  border: 1px solid #fed7aa;
}

.pircel-status-failed {
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.pircel-status-not-attempted {
  color: #6b7280;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
}

.pircel-error-message {
  color: #dc2626;
  font-style: italic;
  margin-top: 8px;
}

#pircel-reset-connection {
  background-color: #dc3232 !important;
  border-color: #dc3232 !important;
  color: #fff !important;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

#pircel-reset-connection:focus {
  box-shadow: 0 0 0 1px #dc3232;
}

#pircel-reset-connection:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#pircel-reset-connection:hover:not(:disabled) {
  background-color: #c62d2d !important;
  border-color: #c62d2d !important;
}

.pircel-api-key-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.pircel-api-key-wrapper .regular-text {
  width: 350px;
  padding-right: 30px;
  box-sizing: border-box;
}

.pircel-toggle-password {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #666;
  border-radius: 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pircel-toggle-password:hover,
.pircel-toggle-password:focus {
  color: #0073aa;
  background: rgb(0 115 170 / 10%);
  outline: none;
}

.pircel-toggle-password .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* Responsive styles */
@media screen and (width < 783px) {
  .pircel-api-key-wrapper .regular-text {
    width: 100%;
    max-width: 350px;
    padding-right: 35px;
  }

  .pircel-toggle-password {
    right: 8px;
    padding: 6px;
  }
}
