/* ============================================================
   Pristine HR — Custom Styles
   Most styling is handled by Tailwind CDN.
   This file covers small custom additions.
   ============================================================ */

/* Smooth page transitions */
#main-content {
  animation: fadeIn 0.18s ease-out;
  padding-top: 1.5rem;
}

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

/* Modal slide-in */
#modal-box {
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Custom scrollbar for modal */
#modal-box::-webkit-scrollbar {
  width: 5px;
}
#modal-box::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
#modal-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
#modal-box::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast transition */
#toast-container > div {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Table row hover */
tbody tr {
  transition: background-color 0.1s ease;
}

/* Focus ring consistent */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Ensure select looks consistent on all browsers */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}

/* Mobile-friendly tap targets */
@media (max-width: 640px) {
  button, a[role="button"] {
    min-height: 44px;
  }
}

/* ============================================================
   UTILITY OVERRIDES — ensure new classes work without a Tailwind rebuild
   ============================================================ */

/* w-fit for admin tabs on desktop */
@media (min-width: 768px) {
  .md-w-fit {
    width: fit-content;
  }
}


/* ============================================================
   MOBILE LAYOUT TWEAKS
   ============================================================ */

/* On very small screens shrink card padding slightly */
@media (max-width: 380px) {
  #main-content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Make modal full-height on small phones (bottom-sheet feel) */
@media (max-width: 640px) {
  #modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  #modal-box {
    border-radius: 1.25rem 1.25rem 0 0;
    max-height: 92vh;
    width: 100%;
  }
  #modal-box {
    animation: slideUpSheet 0.22s ease-out;
  }
}

@keyframes slideUpSheet {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sticky nav shadow on scroll */
nav {
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.18), 0 1px 2px -1px rgba(0,0,0,0.1);
}

/* Demand card hover */
.demand-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
