/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.nav-item {
  background: transparent;
  /* transition: all 0.1s ease; */
}

.nav-item:hover {
  background: linear-gradient(180deg, #2F3137 4.41%, #2B2C32 60.71%);
  border: 1px solid #393A42;
}

.nav-item-active {
  background: linear-gradient(180deg, #2F3137 4.41%, #2B2C32 60.71%);
  border: 1px solid #393A42;
  position: relative;
}

.nav-item-active::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 20px;
  left: -12px;
  top: calc(50% - 10px);
  background: #F3612D;
  border-radius: 0px 2px 2px 0px;
}

/* Custom background color */
/* TODO: Remove this once we have bg-background-light working using tailwind */
.bg-custom {
  background-color: #F8FAFB !important;
}

/* Underline-style navigation tabs (Hopkinson Blue active state) */
button.tab-nav-item,
label.tab-nav-item {
  border-bottom-color: transparent;
  color: #6B7280;
}

button.tab-nav-item:hover:not(.is-active),
label.tab-nav-item:hover:not(.is-active) {
  color: #374151;
  border-bottom-color: #D1D5DB;
}

button.tab-nav-item.is-active,
label.tab-nav-item.is-active {
  border-bottom-color: #192A3D;
  color: #192A3D;
}

/* Dashboard sidebar tabs (CSS-only radio/label pattern) */
.dashboard-sidebar-tabs .dashboard-sidebar-tabs__panel {
  display: none;
}

.dashboard-sidebar-tabs #dashboard-sidebar-tab-watchlist:checked ~ .flex-1 .dashboard-sidebar-tabs__panels [data-tab="watchlist"],
.dashboard-sidebar-tabs #dashboard-sidebar-tab-activity:checked ~ .flex-1 .dashboard-sidebar-tabs__panels [data-tab="activity"] {
  display: flex;
}

.dashboard-sidebar-tabs #dashboard-sidebar-tab-watchlist:checked ~ .flex-1 .border-b label[for="dashboard-sidebar-tab-watchlist"],
.dashboard-sidebar-tabs #dashboard-sidebar-tab-activity:checked ~ .flex-1 .border-b label[for="dashboard-sidebar-tab-activity"] {
  border-bottom-color: #192A3D;
  color: #192A3D;
}

/* Cognac focus for active text inputs, selects, and textareas */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]):not([type="file"]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]):not([type="file"]):focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible {
  border-color: #9B512F !important;
  outline: none !important;
  --tw-ring-color: rgb(155 81 47 / 0.45) !important;
  box-shadow: 0 0 0 1px #9B512F !important;
}

/* Pagination (shared with reference data manage pages) */
.mfr-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.mfr-page-btn:hover {
  background: #F2F2F2;
}

.mfr-page-btn.is-active {
  background: #F2F2F2;
  border-color: #F2F2F2;
  color: #111827;
  font-weight: 600;
}

.mfr-page-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.mfr-pagination-info {
  font-size: 14px;
  color: #6B7280;
}

input[type="checkbox"] {
  color: #A28741 !important;
  accent-color: #A28741 !important;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  border-color: #d1d5db !important;
  border-radius: 3px !important;
}

input[type="checkbox"]:checked {
  background-color: #A28741 !important;
  border-color: #A28741 !important;
  color: #A28741 !important;
}

input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible {
  --tw-ring-color: #A28741 !important;
  border-color: #A28741 !important;
  outline: none;
  box-shadow: 0 0 0 1px #A28741;
}

input[type="radio"] {
  color: #A28741 !important;
  accent-color: #A28741 !important;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  border-color: #d1d5db !important;
}

input[type="radio"]:checked {
  background-color: #A28741 !important;
  border-color: #A28741 !important;
  color: #A28741 !important;
}

input[type="radio"]:focus,
input[type="radio"]:focus-visible {
  --tw-ring-color: #A28741 !important;
  border-color: #A28741 !important;
  outline: none;
  box-shadow: 0 0 0 1px #A28741;
}

/* Custom styles for filters */
.filter-input {
  height: 36px !important;
}

.filter-save-link {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.filter-save-link:hover {
  color: #F3612D;
}

/* Custom styles for range slider */
.slider-styled {
  height: 8px !important;
}

.slider-styled .noUi-connect {
  background: #9B512F !important;
}

.slider-styled .noUi-handle {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid #9B512F !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.slider-styled .noUi-handle:before,
.slider-styled .noUi-handle:after {
  display: none;
}

.slider-styled .noUi-target {
  background: #E5E7EB;
  border: none;
  border-radius: 4px;
  box-shadow: none;
}

/* Loading state transitions */
.opacity-0 {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

/* Skeleton loading animation */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
  100% {
    opacity: 1;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Photo hover animations */
.photo-item {
  cursor: pointer;
}

/* Settings index feature cards (Figma: height 280, radius 12, #F2F2F2; width fills grid) */
.settings-feature-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-sizing: border-box;
  width: 100% !important;
  height: 280px !important;
  padding: 24px !important;
  border-radius: 12px !important;
  border: 1px solid #e4e6e9 !important;
  background-color: #f2f2f2 !important;
}

.settings-feature-card-action {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 0.75rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  background-color: #ffffff !important;
  color: #374151 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease !important;
}

.settings-feature-card-action:hover {
  background-color: #f2f2f2 !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.settings-feature-card-action:active {
  background-color: #e8e8e8 !important;
}
