/* === BID BUDDY BUTTON === */
.ag-btn-buddy {
  position: relative;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 56px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}
.ag-btn-buddy:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
}
.ag-btn-buddy.waiting {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
}
.ag-btn-buddy.active {
  background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
  animation: bbPulse 2s ease infinite;
}
.ag-btn-buddy.paused {
  background: linear-gradient(135deg, #92400e 0%, #f59e0b 100%);
}
@keyframes bbPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 2px 16px rgba(16, 185, 129, 0.7); }
}

/* === STATUS PILL === */
.bb-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}
.bb-pill-waiting {
  background: #e0f2fe;
  color: #0369a1;
}
.bb-pill-active {
  background: #d1fae5;
  color: #065f46;
  animation: pillPulse 1.5s ease infinite;
}
.bb-pill-paused {
  background: #fef3c7;
  color: #92400e;
}
.bb-pill-completed {
  background: #f0fdf4;
  color: #166534;
}
.bb-pill-stopped {
  background: #fef2f2;
  color: #991b1b;
}
@keyframes pillPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === MODAL === */
.bb-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}
.bb-modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.bb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.bb-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}
.bb-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.bb-modal-close:hover {
  color: #6b7280;
}
.bb-modal-body {
  padding: 20px;
}
.bb-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* === STATUS DISPLAY === */
.bb-status-display {
  text-align: center;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 16px;
}
.bb-status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.bb-badge-waiting {
  background: #e0f2fe;
  color: #0369a1;
}
.bb-badge-active {
  background: #d1fae5;
  color: #065f46;
  animation: badgePulse 1.5s ease infinite;
}
.bb-badge-paused {
  background: #fef3c7;
  color: #92400e;
}
.bb-badge-completed {
  background: #f0fdf4;
  color: #166534;
}
.bb-badge-stopped {
  background: #fef2f2;
  color: #991b1b;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.bb-status-info {
  font-size: 13px;
  color: #6b7280;
}

/* === CONFIG === */
.bb-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.bb-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 16px;
}
.bb-step-btn {
  width: 44px;
  height: 44px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 20px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}
.bb-step-btn:first-child {
  border-radius: 8px 0 0 8px;
}
.bb-step-btn:last-child {
  border-radius: 0 8px 8px 0;
}
.bb-step-btn:hover {
  background: #e5e7eb;
}
.bb-step-btn:active {
  background: #d1d5db;
}
.bb-step-input {
  width: 60px;
  height: 44px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  border: 1px solid #e5e7eb;
  border-left: none;
  border-right: none;
  color: #1f2937;
  -moz-appearance: textfield;
}
.bb-step-input::-webkit-outer-spin-button,
.bb-step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bb-timing-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 16px;
}
.bb-timing-info svg {
  flex-shrink: 0;
}

/* === ADVANCED === */
.bb-advanced {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.bb-advanced summary {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  background: #f9fafb;
}
.bb-advanced summary:hover {
  background: #f3f4f6;
}
.bb-advanced-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bb-field span {
  font-size: 12px;
  color: #6b7280;
}
.bb-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.bb-input-prefix {
  padding: 8px 10px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
}
.bb-input-group input {
  flex: 1;
  border: none;
  padding: 8px 10px;
  font-size: 14px;
  color: #1f2937;
  width: 100%;
}
.bb-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.bb-toggle input {
  display: none;
}
.bb-toggle-slider {
  width: 40px;
  height: 22px;
  background: #d1d5db;
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
}
.bb-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.bb-toggle input:checked + .bb-toggle-slider {
  background: #3b82f6;
}
.bb-toggle input:checked + .bb-toggle-slider::after {
  transform: translateX(18px);
}
.bb-toggle-label {
  font-size: 13px;
  color: #374151;
}

/* === BUTTONS === */
.bb-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.bb-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.bb-btn-activate {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.bb-btn-activate:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}
.bb-btn-deactivate {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.bb-btn-deactivate:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}
