/* Button Styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.5;
  vertical-align: middle;
}

/* Fix button_to form styling */
form[style*="display: inline"] {
  display: inline-block;
  margin: 0;
}

form[style*="display: inline"] button {
  margin: 0;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
  color: white;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
  color: white;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
  color: white;
}

.btn-warning {
  background-color: #f39c12;
  color: white;
}

.btn-warning:hover {
  background-color: #e67e22;
  color: white;
}

.btn-success {
  background-color: #27ae60;
  color: white;
}

.btn-success:hover {
  background-color: #229954;
  color: white;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.btn-success:disabled,
.btn-success[disabled],
.btn-success:disabled:hover,
.btn-success[disabled]:hover {
  background-color: #27ae60;
  color: white;
}

/* Tooltip wrapper for disabled buttons (disabled elements don't fire hover) */
.btn-tooltip-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  cursor: not-allowed;
}

.btn-tooltip-wrap[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  transform: translateY(-4px);
  background: #1f2937;
  color: white;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  width: max-content;
  max-width: 240px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.btn-tooltip-wrap[data-tooltip]::after {
  content: "";
  position: absolute;
  top: calc(100% + 4px);
  right: 18px;
  left: auto;
  transform: none;
  border: 6px solid transparent;
  border-bottom-color: #1f2937;
  border-top-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1000;
}

.btn-tooltip-wrap[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.btn-tooltip-wrap[data-tooltip]:hover::after {
  opacity: 1;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}