/**
 * Button Styles - Shared Component
 * Consolidated button styling for all pages
 * Replaces duplicated button styles from main.css, admin.css, home.css
 * 
 * File Path: src/styles/buttons.css
 */

/* ============================================================================
   BASE BUTTON STYLES
   ============================================================================ */

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:disabled {
  background-color: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn:disabled:hover {
  opacity: 0.6;
  transform: none;
}

/* ============================================================================
   BUTTON VARIANTS
   ============================================================================ */

/* Primary Button (explicit class, same as base .btn) */
.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.btn-primary:hover:not(:disabled) {
  background-color: #1d4ed8;
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-primary:disabled {
  background-color: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Secondary Button */
.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background-color: white;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--logo-bg);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-secondary:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-secondary:disabled {
  background-color: var(--logo-bg);
  color: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Tertiary Button (link-style) */
.btn-tertiary {
  display: inline-block;
  padding: 12px 24px;
  background-color: transparent;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.btn-tertiary:hover:not(:disabled) {
  background-color: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.btn-tertiary:active {
  transform: translateY(0);
}

.btn-tertiary:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-tertiary:disabled {
  color: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================================================
   BUTTON SIZES
   ============================================================================ */

/* Small Button */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Large Button */
.btn-lg,
.btn-large {
  padding: 16px 32px;
  font-size: 1.125rem;
}

/* ============================================================================
   BUTTON GROUPS
   ============================================================================ */

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group.vertical {
  flex-direction: column;
}

.btn-group .btn {
  flex: 1;
}

/* ============================================================================
   SPECIAL BUTTON TYPES
   ============================================================================ */

/* Icon Buttons */
.btn-icon {
  padding: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon.btn-sm {
  padding: 6px;
  width: 32px;
  height: 32px;
}

/* Remove/Delete Button */
.remove-manager-btn,
.btn-danger {
  background-color: var(--error-color);
  color: white;
  border: none;
}

.remove-manager-btn:hover:not(:disabled),
.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
  opacity: 0.9;
}

/* ============================================================================
   DARK THEME ADJUSTMENTS
   ============================================================================ */

[data-theme="dark"] .btn-secondary {
  background-color: var(--background-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
  background-color: var(--header-bg);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-tertiary {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  
  .btn-lg,
  .btn-large {
    padding: 14px 28px;
    font-size: 1rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    width: 100%;
  }
}
