/* Registrant Manager - Optimized Production Stylesheet (Replaces Tailwind JIT Compiler) */

:root {
  --rm-primary: #FFCA2C;
  --rm-primary-hover: #e0b224;
  --rm-gray-50: #f9fafb;
  --rm-gray-100: #f3f4f6;
  --rm-gray-200: #e5e7eb;
  --rm-gray-300: #d1d5db;
  --rm-gray-500: #6b7280;
  --rm-gray-700: #374151;
  --rm-gray-800: #1f2937;
  --rm-gray-900: #111827;
  --rm-blue-600: #2563eb;
  --rm-blue-700: #1d4ed8;
  --rm-ring-color: rgba(251, 191, 36, 0.4);
}

/* Layout Container */
.rm-container,
.max-w-7xl {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--rm-gray-800);
}

/* Search Card */
.rm-card,
.max-w-7xl > .bg-white {
  background-color: #ffffff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--rm-gray-100);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

/* Radio Tab Switcher */
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.space-x-4 > * + * {
  margin-left: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.cursor-pointer {
  cursor: pointer;
}
.hidden {
  display: none !important;
}

/* Switch Tabs */
.peer-checked\:bg-gray-200 {
  background-color: var(--rm-gray-100);
  transition: all 0.2s ease-in-out;
}
.peer:checked + span {
  background-color: #e5e7eb !important;
  font-weight: 600;
  color: var(--rm-gray-900);
}
.peer + span {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-color: var(--rm-gray-100);
  border-radius: 0.375rem;
  font-weight: 500;
  color: var(--rm-gray-700);
  user-select: none;
}

/* Grid Layout */
.grid {
  display: grid;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Inputs & Selects */
input[type="text"],
select {
  border: 1px solid var(--rm-gray-300);
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-color: #ffffff;
  color: var(--rm-gray-800);
  box-sizing: border-box;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px var(--rm-ring-color);
}
input::placeholder {
  color: #9ca3af;
}

/* Action Buttons */
#rm_search,
#exportExcel,
#exportPdf,
.rm-btn {
  background-color: var(--rm-primary);
  color: var(--rm-gray-900);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#rm_search {
  padding-left: 2rem;
  padding-right: 2rem;
}
#rm_search:hover,
#exportExcel:hover,
#exportPdf:hover,
.rm-btn:hover {
  background-color: var(--rm-primary-hover);
}
#rm_search:active,
#exportExcel:active,
#exportPdf:active {
  transform: scale(0.98);
}
#exportExcel:disabled,
#exportPdf:disabled,
#rm_search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Results & Tables */
.overflow-x-auto {
  overflow-x: auto;
}
#rm_results {
  transition: opacity 0.2s ease;
}

.min-w-full {
  min-width: 100%;
}
.divide-y > * + * {
  border-top-width: 1px;
}
.divide-gray-200 > * + * {
  border-top-color: var(--rm-gray-200);
}

table#data_table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
table#data_table thead tr {
  background-color: var(--rm-gray-100);
  color: var(--rm-gray-800);
  font-size: 0.875rem;
  font-weight: 600;
}
table#data_table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rm-gray-200);
}
table#data_table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--rm-gray-200);
  vertical-align: middle;
}
table#data_table tbody tr {
  background-color: #ffffff;
  transition: background-color 0.15s ease;
}
table#data_table tbody tr:nth-child(even) {
  background-color: rgba(249, 250, 251, 0.6);
}
table#data_table tbody tr:hover {
  background-color: #f3f4f6;
}

/* Links & Details in Table */
table#data_table a,
.text-blue-600 {
  color: var(--rm-blue-600);
  text-decoration: none;
}
table#data_table a:hover,
.hover\:underline:hover {
  text-decoration: underline;
  color: var(--rm-blue-700);
}
.font-semibold {
  font-weight: 600;
}
.text-gray-700 {
  color: var(--rm-gray-700);
}
.rm_reg_date {
  color: var(--rm-gray-500);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Pulse animation during loading */
@keyframes rm-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.animate-pulse {
  animation: rm-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

/* Profile View Shortcode Tables */
.registrant_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background-color: #ffffff;
  border: 1px solid var(--rm-gray-200);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.registrant_table th,
.registrant_table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rm-gray-200);
  font-size: 0.875rem;
}
.section_heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: #012379;
  display: inline-block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.registrant_listing {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.registrant_listing li {
  margin-bottom: 0.25rem;
}
.registrant_listing a {
  color: var(--rm-blue-600);
  text-decoration: none;
}
.registrant_listing a:hover {
  text-decoration: underline;
}
