.ssb-campaign-form {
  margin-top: 30px;
}


.ssb-product-selector {
  margin: 15px 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #ddd;
}

.ssb-toggle {
  position: relative;
  display: inline-block;
  touch-action: pan-x;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ssb-toggle input {
  display: none;
}

.ssb-toggle-track {
  width: 40px;
  height: 20px;
  padding: 0;
  border-radius: 30px;
  background-color: #e9e9e9;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-block;
  position: relative;
}

.ssb-toggle input:checked+.ssb-toggle-track {
  background-color: #0D47A1;
}

.ssb-toggle-indicator {
  width: 16px;
  height: 16px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  right: auto;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ssb-toggle input:checked+.ssb-toggle-track .ssb-toggle-indicator {
  left: calc(100% - 18px);
}

/* Loading state styles */
.ssb-toggle.loading .ssb-toggle-track {
  opacity: 0.7;
  pointer-events: none;
}

.ssb-toggle.loading .ssb-toggle-indicator {
  animation: toggle-pulse 1s infinite;
}

@keyframes toggle-pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.ssb-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.ssb-modal-content {
  background-color: #ECEFF1;
  margin: 5% auto;
  padding: 20px;
  width: 70%;
  max-width: 800px;
  border-radius: 4px;
}

.close {
  position: absolute;
  right: 10px;
  top: 5px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#product-search {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
}

#search-results {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.product-result {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.product-result label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 15px;
}

.product-item {
  margin: 15px 0;
  position: relative;
}

.product-item img {
  border-radius: 20px;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.remove-product {
  position: absolute;
  right: 10px;
  top: 0;
  background: #fff;
  border: 2px solid #dc3545;
  color: #dc3545;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.remove-product:hover {
  background: #dc3545;
  color: #fff;
}

.product-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.product-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-title {
  margin: 0;
  font-size: 16px;
  color: #333;
  flex: 1;
}

.price-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.price-row:last-child {
  border-bottom: none;
}

.price-label {
  color: #6c757d;
  font-size: 14px;
}

.price-value,
.original-price {
  font-weight: 600;
  color: #2c3e50;
}

.savings-value {
  color: #28a745;
}

.discount-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.discount-type-wrapper,
.discount-value-wrapper {
  position: relative;
}

.discount-controls label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.discount-type {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 10px 35px 10px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  background-color: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.discount-type-wrapper::after {
  content: '▼';
  font-size: 12px;
  color: #6c757d;
  position: absolute;
  right: 15px;
  top: 65%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: all 0.2s ease;
}

.discount-value {
  width: 100%;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  background-color: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.discount-value::-webkit-outer-spin-button,
.discount-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.discount-value[type=number] {
  -moz-appearance: textfield;
}

.discount-type:focus,
.discount-value:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.discount-type:hover,
.discount-value:hover {
  border-color: #cbd5e1;
}

.discount-type-wrapper:hover::after {
  color: #4f46e5;
}

.discount-type:active,
.discount-value:active {
  border-color: #4f46e5;
}

.discount-value::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.price-row.discounted:not(.active) {
  display: none;
}

.price-row.savings {
  background: #e8f5e9;
  margin: 8px -15px -15px -15px;
  padding: 12px 15px;
  border-radius: 0 0 8px 8px;
}

@media (max-width: 768px) {
  .discount-controls {
    grid-template-columns: 1fr;
  }
}

/* Notice styling */
.notice {
  margin: 15px 0;
}

.price-info {
  margin: 10px 0;
  font-size: 14px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  align-items: center;
}

.price-label {
  color: #666;
  font-weight: normal;
}

.price-value {
  font-weight: bold;
}

.original-price {
  font-weight: bold;
}

.savings-value {
  color: #28a745;
}

.discount-settings {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.discount-settings select,
.discount-settings input {
  flex: 1;
}

/* Header Styles */
.ssb-admin-wrap {
  margin: 20px;
  max-width: 1400px;
}

.ssb-header {
  background: linear-gradient(135deg, #0D47A1, #00ACC1);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ssb-header-content {
  max-width: 800px;
}

.ssb-plugin-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.ssb-plugin-title h1 {
  margin: 0;
  color: white;
  font-size: 28px;
  font-weight: 600;
}

.ssb-description {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
}

/* Stats Grid */
.ssb-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.ssb-stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 15px;
}

.ssb-stat-card .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #0D47A1;
}

.stat-content h3 {
  margin: 0;
  font-size: 24px;
  color: #2c3e50;
}

.stat-content p {
  margin: 5px 0 0;
  color: #666;
}

/* Quick Actions */
.ssb-quick-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.ssb-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.ssb-button-primary {
  background: #0D47A1;
  color: white;
}

.ssb-button-primary:hover {
  background: #0a3880;
  color: white;
}

.ssb-button-secondary {
  background: #f8f9fa;
  color: #2c3e50;
  border: 1px solid #dee2e6;
}

.ssb-button-secondary:hover {
  background: #e9ecef;
  color: #2c3e50;
}

/* Table Styles */
.ssb-table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.ssb-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.ssb-table-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ssb-table-actions {
  display: flex;
  gap: 10px;
}

.shortcode-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.shortcode-copy code {
  padding: 4px 8px;
  background: #f0f0f1;
  border-radius: 4px;
  font-size: 12px;
}

.copy-feedback {
  position: relative;
  display: flex;
  align-items: center;
}

.copy-message {
  position: absolute;
  left: 30px;
  background: #4CAF50;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
}

.copy-feedback.show-message .copy-message {
  opacity: 1;
  transform: translateX(0);
}

.ssb-copy-button {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #2271b1;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.ssb-copy-button:hover {
  background: #f0f0f1;
  color: #135e96;
}

.ssb-copy-button .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.ssb-copy-button.copied {
  color: #4CAF50;
  pointer-events: none;
}

.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.ssb-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.ssb-action-button .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  transition: color 0.2s ease;
}

/* Specific button colors */
.ssb-edit .dashicons {
  color: #2271b1;
}

.ssb-edit:hover .dashicons {
  color: #135e96;
}

.ssb-duplicate .dashicons {
  color: #2E7D32;
}

.ssb-duplicate:hover .dashicons {
  color: #1B5E20;
}

.ssb-delete .dashicons {
  color: #DC3232;
}

.ssb-delete:hover .dashicons {
  color: #B71C1C;
}

/* Loading state */
.ssb-action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Table header alignment */
.wp-list-table th {
  text-align: center !important;
}

/* Campaign name column exception - keep left aligned */
.wp-list-table th:first-child {
  text-align: left !important;
}

/* Center align table cells */
.wp-list-table td {
  text-align: center;
  vertical-align: middle;
}

/* Keep campaign name cell left aligned */
.wp-list-table td:first-child {
  text-align: left;
}

/* Keep action buttons centered */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

/* Campaign Form Styles */
.ssb-campaign-form {
  margin-top: 30px;
}


.ssb-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  transition: box-shadow 0.3s ease;
}

.ssb-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.ssb-card-header {
  padding: 20px 25px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ssb-card-header h2 {
  margin: 0;
  font-size: 18px;
  color: #1e293b;
  font-weight: 600;
}

.ssb-card-header .dashicons {
  color: #0D47A1;
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.ssb-card-content {
  padding: 25px;
}

.ssb-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 25px;
}

.ssb-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ssb-form-group label {
  font-weight: 500;
  color: #1e293b;
  font-size: 14px;
}

.ssb-form-group input[type="text"],
.ssb-form-group select {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.ssb-form-group input[type="text"]:focus,
.ssb-form-group select:focus {
  border-color: #0D47A1;
  box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
  outline: none;
}

.ssb-select-wrapper {
  position: relative;
}

.ssb-select-wrapper:after {
  content: '▼';
  font-size: 12px;
  color: #64748b;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.description {
  color: #64748b;
  font-size: 13px;
  margin-top: 4px;
}

.ssb-products-section {
  display: grid;
  gap: 30px;
  margin: 30px 0;
}

@media (min-width: 1200px) {
  .ssb-products-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ssb-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.ssb-button-primary {
  background: linear-gradient(135deg, #0D47A1, #1976D2);
  color: white;
}

.ssb-button-primary:hover {
  background: linear-gradient(135deg, #0a3880, #1565C0);
  transform: translateY(-1px);
}

.ssb-button-secondary {
  background: #f1f5f9;
  color: #1e293b;
}

.ssb-button-secondary:hover {
  background: #e2e8f0;
}

.ssb-form-actions {
  display: flex;
  gap: 15px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}