/* Price A/B Test Styles */

.woocommerce-required-notice {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  margin: 20px 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.notice-icon {
  font-size: 48px;
  opacity: 0.7;
}

.notice-content h3 {
  margin: 0 0 10px 0;
  color: #23282d;
  font-size: 20px;
}

.notice-content p {
  margin: 0 0 20px 0;
  color: #666;
  line-height: 1.6;
}

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

/* Search Controls */
.product-search-section {
  margin-bottom: 20px;
}

.search-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 15px;
}

.form-control {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Products Table */
.products-table-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  max-height: 500px;
  overflow-y: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table thead {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 10;
}

.products-table thead th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e0e0e0;
  font-size: 14px;
}

.products-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.products-table tbody tr:hover {
  background-color: #f8f9fa;
}

.products-table tbody tr.selected {
  background-color: #e8f5e9;
}

.products-table tbody tr.has-active-test {
  opacity: 0.5;
  pointer-events: none;
  background: #ffe5e5;
}

.products-table td {
  padding: 12px 15px;
  vertical-align: middle;
}

.product-image-cell img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.product-image-cell .no-image {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 24px;
}

.product-info-cell .product-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
  font-size: 14px;
}

.product-info-cell .product-id {
  font-size: 12px;
  color: #7f8c8d;
}

.product-price-cell .price-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.original-price-strike {
  text-decoration: line-through;
  color: #95a5a6;
  font-size: 14px;
}

.sale-price-main {
  color: #e74c3c;
  font-weight: 700;
  font-size: 16px;
}

.current-price-main {
  color: #27ae60;
  font-weight: 700;
  font-size: 16px;
}

.btn-select-product {
  background: #27ae60;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-select-product:hover {
  background: #229954;
  transform: translateY(-1px);
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #7f8c8d;
}

/* Price Variants Section */
.price-variants-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.variant-column {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.control-column {
  border-color: #3498db;
}

.variant-column-b {
  border-color: #27ae60;
}

.variant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.variant-header h4 {
  margin: 0;
  color: #2c3e50;
  font-size: 18px;
}

.variant-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.control-badge {
  background: #3498db;
  color: white;
}

.variant-badge-b {
  background: #27ae60;
  color: white;
}

/* Product Preview */
.product-preview {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 20px;
}

.product-preview-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e0e0;
}

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

.product-preview-details h5 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 16px;
}

.product-id {
  margin: 0;
  color: #7f8c8d;
  font-size: 13px;
}

/* Price Form */
.price-form {
  margin-top: 20px;
}

.price-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 12px;
  color: #7f8c8d;
  font-weight: 600;
  font-size: 16px;
  pointer-events: none;
}

.price-input-wrapper input {
  width: 100%;
  padding: 10px 10px 10px 28px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
}

.price-input-wrapper input:focus {
  outline: none;
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.price-input-wrapper input[readonly] {
  background: #f5f5f5;
  cursor: not-allowed;
}

.help-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #7f8c8d;
}

.help-text.error {
  color: #e74c3c;
}

/* Current Price Display */
.current-price-display {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  text-align: center;
}

.current-price-display label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-badge {
  display: inline-block;
  padding: 10px 20px;
  background: #3498db;
  color: white;
  font-size: 24px;
  font-weight: 700;
  border-radius: 6px;
}

.variant-price-badge {
  background: #27ae60;
  font-size: 20px;
}

/* Price Preview Box with Strikethrough */
.price-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.strikethrough-price {
  font-size: 20px;
  color: #95a5a6;
  text-decoration: line-through;
  font-weight: 600;
}

/* Coupon Section */
#coupon-section {
  margin-top: 15px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
}

/* Price Comparison */
.price-comparison {
  margin-top: 20px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
}

.comparison-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.comparison-item:not(:last-child) {
  border-bottom: 1px solid #ffe69c;
}

.comparison-item .label {
  font-size: 14px;
  color: #856404;
  font-weight: 500;
}

.comparison-item .value {
  font-size: 16px;
  color: #856404;
  font-weight: 700;
}

/* Preview URL Section */
.preview-url-section {
  margin-top: 30px;
  padding: 20px;
  background: #e3f2fd;
  border: 2px solid #2196f3;
  border-radius: 8px;
}

.preview-url-section h4 {
  margin: 0 0 15px 0;
  color: #1976d2;
  font-size: 16px;
}

.preview-urls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.url-box {
  background: white;
  padding: 15px;
  border-radius: 6px;
}

.url-box label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #555;
  font-weight: 600;
}

.url-display {
  display: flex;
  gap: 10px;
}

.url-display input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: #f8f9fa;
  font-family: monospace;
}

.btn-copy,
.btn-visit {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
}

.btn-copy {
  background: #2196f3;
  color: white;
}

.btn-copy:hover {
  background: #1976d2;
}

.btn-visit {
  background: #4caf50;
  color: white;
}

.btn-visit:hover {
  background: #388e3c;
}

/* Results Section */
.results-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.result-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.result-card h4 {
  margin: 0 0 20px 0;
  color: #2c3e50;
  font-size: 18px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
}

.stat {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Test Controls */
.test-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
}

#use-coupon-toggle {
  width: 1rem;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .price-variants-container {
    grid-template-columns: 1fr;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

  .results-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .products-table-container {
    max-height: 400px;
  }

  .products-table thead th {
    padding: 10px;
    font-size: 12px;
  }

  .products-table td {
    padding: 8px 10px;
  }

  .product-image-cell img,
  .product-image-cell .no-image {
    width: 50px;
    height: 50px;
  }

  .result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .url-display {
    flex-direction: column;
  }
}
