/* ================================
   BUTTON COMPONENT STYLES
   ================================ */

/* Base Button Styles */
.btn {
  padding: 0.375rem 0.5rem;
  border: none;
  border-radius: var(--radius-md, 0.75rem);
  font-size: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal, 0.3s ease);
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 152, 0, 0.3);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs, 0.5rem);
  text-align: center;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-text {
  display: flex;
  align-items: center;
}

/* Primary Button */
.btn-primary {
  background: var(--primary-color, #f21b23);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark, #d91820);
  box-shadow: var(--shadow-md, 0 2px 6px rgba(0, 0, 0, 0.15));
  transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
  background: #ef6c00;
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background: var(--bg-gray, #e5e5e5);
  color: var(--text-primary, #4d4d4f);
  border: 2px solid var(--border-color, #ffcc80);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border-color, #ffcc80);
  border-color: var(--primary-color, #f21b23);
}

/* Export Button */
.btn-export {
  background: var(--accent-color, #d91820);
  color: white;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.btn-export:hover:not(:disabled) {
  background: #e64a19;
  box-shadow: var(--shadow-md, 0 2px 6px rgba(0, 0, 0, 0.15));
  transform: translateY(-2px);
}

.btn-export .btn-icon svg {
  width: 18px;
  height: 18px;
}

/* Update Button */
.btn-update {
  background: #546e7a;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm, 0.5rem);
}

.btn-update:hover:not(:disabled) {
  background: #455a64;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.12));
  transform: translateY(-2px);
}

/* Delete Button */
.btn-delete {
  background: #f44336;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm, 0.5rem);
}

.btn-delete:hover:not(:disabled) {
  background: #d32f2f;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.12));
  transform: translateY(-2px);
}

/* Close Button */
.btn-close {
  background: transparent;
  border: none;
  padding: var(--spacing-xs, 0.5rem);
  color: var(--text-secondary, #4d4d4f);
  min-width: 44px;
  min-height: 44px;
}

.btn-close:hover:not(:disabled) {
  background: var(--bg-gray, #e5e5e5);
}

.btn-close .btn-icon svg {
  width: 24px;
  height: 24px;
}

/* Icon Button (for icon-only buttons) */
.btn-icon-only {
  padding: var(--spacing-xs, 0.5rem);
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: none;
  color: var(--text-secondary, #4d4d4f);
}

.btn-icon-only:hover:not(:disabled) {
  background: var(--bg-gray, #e5e5e5);
}

/* Popup Close Button (for modals) */
.btn-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  min-width: 30px;
  min-height: 30px;
}

.btn-popup-close:hover:not(:disabled) {
  background-color: #f0f0f0;
}

/* Popup OK Button */
.btn-popup-ok {
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
  width: 100%;
}

.btn-popup-ok:hover:not(:disabled) {
  background-color: #45a049;
}

/* Dashboard View Logs Button - radius matches period select (e.g. Last 30 days) */
.btn.btn-dashboard-logs {
  padding: 0.75rem 0.65rem;
  border-radius: 4px;
  background: #f21b23;
  color: #ffffff;
  font-size: 0.95rem;
}

.btn-dashboard-logs:hover:not(:disabled) {
  background: var(--primary-dark, #d91820);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .btn-export {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
  }
}
