/**
 * Promo Codes Styles
 */

/* Split Card Landing */
.promo-split-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.promo-split-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.promo-split-card .card-title {
  color: #212529;
}

/* Table Styling */
#promo-codes-table {
  font-size: 0.9rem;
}

#promo-codes-table code {
  font-size: 0.95em;
  padding: 0.2em 0.4em;
  background-color: #f8f9fa;
  border-radius: 3px;
}

#promo-codes-table .btn-sm {
  padding: 0.25rem 0.4rem;
}

/* History Modal */
#historyModal .nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

#historyModal .nav-link {
  border: none;
  padding: 0.75rem 1rem;
  color: #6c757d;
}

#historyModal .nav-link.active {
  color: #0d6efd;
  font-weight: 500;
  border-bottom: 2px solid #0d6efd;
}

#edit-history-tbody td,
#use-history-tbody td {
  vertical-align: middle;
  font-size: 0.875rem;
}

/* Zinrelo Modal */
#zinreloGeneratorModal .alert-info ul {
  margin-left: 1rem;
}

#generated-codes-output {
  font-size: 0.8rem;
  line-height: 1.6;
  background-color: #f8f9fa;
}

/* Form Enhancements */
.text-uppercase {
  text-transform: uppercase;
}

/* Badge styling in history */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Pagination styling */
#pagination-controls {
  margin-bottom: 0;
}

#pagination-controls .page-link {
  padding: 0.375rem 0.75rem;
}

/* Search Panel */
.btn-group > .btn-check:checked + .btn {
  z-index: 1;
}

/* Loading state */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #promo-codes-table {
    font-size: 0.8rem;
  }

  #promo-codes-table .btn-sm {
    padding: 0.2rem 0.3rem;
  }

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

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

/* Action badges in history */
.badge.bg-success {
  background-color: #198754 !important;
}

.badge.bg-primary {
  background-color: #0d6efd !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

/* Table hover effect */
#promo-codes-table tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

/* Modal max heights for scrolling */
#edit-history-pane,
#use-history-pane {
  max-height: 400px;
  overflow-y: auto;
}

/* Copy success animation */
#copy-success-alert {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
