/* Open Orders Table Specific Styles */
.open-orders-table-wrapper {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.open-orders-table th,
.open-orders-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.open-orders-table th {
  background: var(--color-bg-secondary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.open-orders-table tr:last-child td {
  border-bottom: none;
}

.open-orders-table tr:hover {
  background: var(--color-bg-secondary);
}

.order-row {
  transition: background-color 0.2s ease;
}

.order-side, .order-type, .order-time-in-force, .order-class {
  white-space: nowrap;
}

.order-qty, .order-price, .order-stop-price {
  font-family: 'SF Mono', monospace;
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.order-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Cancel order button styling */
.cancel-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 36px;
  padding: 0 var(--space-sm);
  border-radius: 6px;
  color: white;
  background: var(--color-danger);
  border: 1px solid var(--color-danger);
  transition: all 0.2s ease;
  position: relative;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.cancel-order-btn:hover {
  background: #c82333;
  border-color: #bd2130;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.cancel-order-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Cancel button spinner */
.cancel-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--color-danger);
  animation: spin 1s ease-in-out infinite;
  margin: 0;
}

/* Empty state styling */
.open-orders-table .empty-row {
  text-align: center;
}

.open-orders-table .empty-message {
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-tertiary);
  font-style: italic;
}

/* Responsive styling for mobile */
@media (max-width: 767px) {
  .open-orders-table-wrapper {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .open-orders-table,
  .open-orders-table thead,
  .open-orders-table tbody,
  .open-orders-table th,
  .open-orders-table td,
  .open-orders-table tr {
    display: block;
  }
  
  .open-orders-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .open-orders-table tr {
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    background: var(--color-bg-primary);
  }
  
  .open-orders-table tr:last-child {
    margin-bottom: 0;
  }
  
  .open-orders-table td {
    border: none;
    position: relative;
    padding: var(--space-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .open-orders-table td:before {
    content: attr(data-label);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
  }
}