/**
 * Button Component - Based on Original ProRank Unified Design
 * 
 * Premium button system with gradients, animations, and hover effects
 * From the original prorank-unified.css design
 * 
 * @since 3.0.0
 */

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

.prorank-btn,
.prorank-button {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  outline: none;
  line-height: 1;
}

/* Shimmer effect on hover */
.prorank-btn::before,
.prorank-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.prorank-btn:hover::before,
.prorank-button:hover::before {
  transform: translateX(100%);
}

/* ============================================
   PRIMARY BUTTON - ORANGE GRADIENT (DEFAULT)
   ============================================ */

.prorank-btn-primary,
.prorank-button--primary {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(251, 146, 60, 0.4);
}

.prorank-btn-primary:hover,
.prorank-button--primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 8px 25px rgba(251, 146, 60, 0.5);
  color: white;
}

.prorank-btn-primary:active,
.prorank-button--primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.4);
}

/* ============================================
   BLUE PRIMARY VARIANT
   White text with orange icons
   ============================================ */

.prorank-btn-primary.prorank-btn-blue,
.prorank-button--primary.prorank-button--blue {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.prorank-btn-primary.prorank-btn-blue:hover,
.prorank-button--primary.prorank-button--blue:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  color: white !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

/* Orange icons in blue buttons */
.prorank-btn-primary.prorank-btn-blue .dashicons,
.prorank-btn-primary.prorank-btn-blue svg,
.prorank-btn-primary.prorank-btn-blue i,
.prorank-button--primary.prorank-button--blue .dashicons,
.prorank-button--primary.prorank-button--blue svg,
.prorank-button--primary.prorank-button--blue i {
  color: #fb923c !important;
}

/* ============================================
   ORANGE PRIMARY VARIANT
   White text with blue icons
   ============================================ */

.prorank-btn-primary.prorank-btn-orange,
.prorank-button--primary.prorank-button--orange {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: white !important;
  box-shadow: 0 4px 15px rgba(251, 146, 60, 0.4);
}

.prorank-btn-primary.prorank-btn-orange:hover,
.prorank-button--primary.prorank-button--orange:hover {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white !important;
  box-shadow: 0 8px 25px rgba(251, 146, 60, 0.5);
}

/* Blue icons in orange buttons */
.prorank-btn-primary.prorank-btn-orange .dashicons,
.prorank-btn-primary.prorank-btn-orange svg,
.prorank-btn-primary.prorank-btn-orange i,
.prorank-button--primary.prorank-button--orange .dashicons,
.prorank-button--primary.prorank-button--orange svg,
.prorank-button--primary.prorank-button--orange i {
  color: #2563eb !important;
}

/* ============================================
   SECONDARY BUTTON
   ============================================ */

.prorank-btn-secondary,
.prorank-button--secondary {
  background: #ffffff;
  color: #374151;
  border: 2px solid #e5e7eb;
  position: relative;
}

.prorank-btn-secondary:hover,
.prorank-button--secondary:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ============================================
   SUCCESS BUTTON (Save/Submit)
   ============================================ */

.prorank-btn-success,
.prorank-button--success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
}

.prorank-btn-success:hover,
.prorank-button--success:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  color: white;
}

/* ============================================
   DANGER BUTTON
   ============================================ */

.prorank-btn-danger,
.prorank-button--danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.prorank-btn-danger:hover,
.prorank-button--danger:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
  color: white;
}

/* ============================================
   GHOST BUTTON
   ============================================ */

.prorank-btn-ghost,
.prorank-button--ghost {
  background: transparent;
  color: var(--prorank-primary);
  border: 1px solid var(--prorank-border);
}

.prorank-btn-ghost:hover,
.prorank-button--ghost:hover {
  background: var(--prorank-bg-secondary);
  border-color: var(--prorank-primary);
  color: var(--prorank-primary);
}

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

.prorank-btn-sm,
.prorank-button--small {
  padding: 8px 16px;
  font-size: 13px;
}

.prorank-btn-lg,
.prorank-button--large {
  padding: 14px 32px;
  font-size: 16px;
}

/* ============================================
   BUTTON STATES
   ============================================ */

.prorank-btn:disabled,
.prorank-button:disabled,
.prorank-btn.disabled,
.prorank-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.prorank-btn:disabled::before,
.prorank-button:disabled::before {
  display: none;
}

/* ============================================
   ICON ANIMATIONS
   ============================================ */

.prorank-btn .dashicons,
.prorank-button .dashicons {
  transition: transform 0.3s ease;
  line-height: 1;
  font-size: 16px;
}

.prorank-btn:hover .dashicons,
.prorank-button:hover .dashicons {
  transform: rotate(10deg) scale(1.1);
}

.prorank-btn:hover .dashicons-update,
.prorank-button:hover .dashicons-update {
  transform: rotate(180deg);
}

.prorank-btn:hover .dashicons-arrow-right,
.prorank-button:hover .dashicons-arrow-right,
.prorank-btn:hover .dashicons-arrow-right-alt,
.prorank-button:hover .dashicons-arrow-right-alt {
  transform: translateX(3px);
}

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

.prorank-button-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.prorank-button-group .prorank-btn,
.prorank-button-group .prorank-button {
  margin: 0;
}

/* ============================================
   LOADING STATE
   ============================================ */

.prorank-btn.loading,
.prorank-button.loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}

.prorank-btn.loading::after,
.prorank-button.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   ICON-ONLY BUTTONS
   ============================================ */

.prorank-btn-icon,
.prorank-button--icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  justify-content: center;
}

.prorank-btn-icon .dashicons,
.prorank-button--icon .dashicons {
  margin: 0;
}

/* ============================================
   WORDPRESS COMPAT
   ============================================ */

.prorank-button.button {
  height: auto;
  line-height: 1;
}

/* Override WordPress button styles */
.wrap .prorank-btn,
.wrap .prorank-button {
  vertical-align: middle;
}

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

@media (max-width: 768px) {
  .prorank-btn,
  .prorank-button {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .prorank-btn-sm,
  .prorank-button--small {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .prorank-btn-lg,
  .prorank-button--large {
    padding: 12px 24px;
    font-size: 14px;
  }
}