/* Page Test Minimal Styles */
.test-page {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.back-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  color: #333;
}

.back-btn:hover {
  background: #e9e9e9;
}

.test-section {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.variants-section h3 {
  margin-bottom: 20px;
  color: #333;
}

.variant-group {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fafafa;
}

.variant-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #333;
}

.variant-input {
  position: relative;
  margin-bottom: 10px;
}

.variant-input input,
.variant-input select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.page-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.checkbox-group {
  margin: 15px 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

#variant-actions {
  margin-top: 10px;
}

#variant-actions button {
  margin-right: 10px;
}

.traffic-section h3 {
  margin-bottom: 15px;
  color: #333;
}

.traffic-split {
  display: flex;
  gap: 20px;
}

.traffic-item {
  flex: 1;
}

.traffic-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.traffic-item input {
  width: 90%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

.form-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.btn-primary {
  background: #0073aa;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

.btn-primary:hover {
  background: #005a87;
}

.btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

.btn-secondary:hover {
  background: #e9e9e9;
}

.btn-danger {
  background: #dc3232;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

.btn-danger:hover {
  background: #c62d2d;
}

.btn-small {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 5px;
}

.btn-small:hover {
  background: #e9e9e9;
}

.btn-small.btn-danger {
  background: #dc3232;
  color: white;
  border-color: #dc3232;
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.results-table th,
.results-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.results-table th {
  background: #f9f9f9;
  font-weight: 500;
  color: #333;
}

.results-table tr:hover {
  background: #f5f5f5;
}

.test-controls {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

#tests-list table {
  width: 100%;
  border-collapse: collapse;
}

#tests-list th,
#tests-list td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

#tests-list th {
  background: #f9f9f9;
  font-weight: 500;
}

.status {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status.active {
  background: #d4edda;
  color: #155724;
}

.status.stopped {
  background: #f8d7da;
  color: #721c24;
}

.status.draft {
  background: #fff3cd;
  color: #856404;
}

/*--------*/
.page-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.variant-input {
  position: relative;
}

.dropdown-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.dropdown-item:last-child {
  border-bottom: none;
}

#control-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

#variant-select,
#variant-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-width: 100%;
}

.variant-input select,
.variant-input input {
  width: 100%;
  box-sizing: border-box;
}

/* ------- */
/* Segmentation Section Styles */
.segmentation-section {
  flex: 1;
}

.segmentation-section h3 {
  margin-bottom: 15px;
  color: #333;
}

.segmentation-grid {
  display: flex;
  gap: 15px;
}

.segmentation-item {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.segmentation-item label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.segmentation-item select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}

.segmentation-item select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 1px #0073aa;
}

/* Responsive layout */
@media (max-width: 768px) {
  .segmentation-grid {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .segmentation-grid {
    gap: 8px;
  }

  .segmentation-item select {
    padding: 6px 10px;
    font-size: 13px;
  }
}
