/*
 * Author: Pyrukent
 * gresaax/assets/css/components.css
 * Proyecto GRESAAX S.A. DE C.V.
 * Versión: 1.0
 */

/* BOTONES */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  text-align: center;
}

.btn-wood {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn-wood:hover {
  background: #6B3410;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-outline:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn-gold {
  background: var(--color-accent);
  color: var(--color-primary);
}

.btn-gold:hover {
  background: #B8860B;
  transform: translateY(-2px);
}

/* CARDS */
.card {
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-light-gray);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: var(--color-light-gray);
  border-top: 1px solid #ddd;
}

/* BADGES */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-wood {
  background: var(--color-secondary);
  color: var(--color-white);
}

.badge-gold {
  background: var(--color-accent);
  color: var(--color-primary);
}

.badge-outline {
  background: transparent;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
}

/* ALERTS */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border-color: #28a745;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border-color: #dc3545;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border-color: #17a2b8;
}

/* LOADING */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-light-gray);
  border-top: 4px solid var(--color-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

/* TOOLTIPS */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 1000;
}

.tooltip:hover::before {
  opacity: 1;
}

/* PROGRESS */
.progress {
  width: 100%;
  height: 8px;
  background: var(--color-light-gray);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}