@tailwind base;
@tailwind components;
@tailwind utilities;

.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* ===========================
   Checkbox Styles
   =========================== */
.custom-checkbox {
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  margin: 0;
  color: #e11d48;
  display: grid;
  place-content: center;
}
.custom-checkbox::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em #e11d48;
  background-color: #e11d48;
  transform-origin: bottom left;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.custom-checkbox:checked::before {
  transform: scale(1);
}

/* ===========================
   Filter Accordion Styles
   =========================== */
.filter-content {
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    opacity 0.3s ease-out,
    margin 0.3s ease-out;
}
.filter-content.collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0 !important;
}

/* Custom scrollbar for filter lists */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===========================
   Mega Menu Additions
   =========================== */
.gnc-lvl2-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #4b5563; /* gray-600 */
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.gnc-lvl2-btn:hover,
.gnc-lvl2-btn:focus,
.gnc-lvl2-btn.is-active {
  background-color: #ffffff;
  color: #e11d48; /* brand-red */
  border-left-color: #e11d48;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gnc-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.gnc-lvl2-btn.is-active .gnc-arrow,
.gnc-lvl2-btn:hover .gnc-arrow {
  opacity: 1;
  transform: translateX(0);
}

.gnc-panel {
  display: none;
  opacity: 0;
}

.gnc-panel.is-active {
  display: block;
  opacity: 1;
  animation: fadePanel 0.3s ease-out forwards;
}

@keyframes fadePanel {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gnc-col-title {
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 16px;
  text-transform: uppercase;
  color: #111827;
  letter-spacing: 0.1em;
}

.gnc-links a {
  font-size: 13px;
  color: #4b5563;
  font-weight: 600;
  transition: color 0.2s ease;
  display: inline-block;
}

.gnc-links a:hover {
  color: #e11d48; /* brand-red */
  text-decoration: underline;
}

/* ===========================
   Scrollable Marquees
   =========================== */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-reverse {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.animate-marquee-reverse {
  display: flex;
  width: max-content;
  animation: marquee-reverse 25s linear infinite;
}

.animate-marquee:hover,
.animate-marquee-reverse:hover {
  animation-play-state: paused;
}

/* ===========================
   Edge Fading Effect
   =========================== */
.edge-fade::before,
.edge-fade::after {
  content: "";
  position: absolute;
  top: 0;
  width: 56px;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}
.edge-fade::before {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(249, 250, 251, 1),
    rgba(249, 250, 251, 0)
  );
}
.edge-fade::after {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(249, 250, 251, 1),
    rgba(249, 250, 251, 0)
  );
}

/* ===========================
   Mobile menu (accordion)
   =========================== */
.gnc-mob-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #f3f4f6;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.gnc-mob-btn[aria-expanded="true"] {
  border-color: rgba(225, 29, 56, 0.4);
  background: #fffafa;
  color: #e11d48;
}

.gnc-mob-btn[aria-expanded="true"] .gnc-arrow {
  transform: rotate(180deg);
  color: #e11d48;
}

.gnc-mob-panel {
  padding: 8px 12px;
  background: #fdfdfd;
  border-radius: 0 0 6px 6px;
  border: 1px solid #f3f4f6;
  border-top: none;
  margin-top: -4px;
}

.gnc-mob-link {
  display: block;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.2s ease;
}

.gnc-mob-link:last-child {
  border-bottom: none;
}

.gnc-mob-link:hover {
  color: #e11d48;
}

/* ===========================
   Footer & Text Animations
   =========================== */
.hover-underline-animation {
  display: inline-block;
  position: relative;
}
.hover-underline-animation::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #e11d48; /* brand-red */
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.hover-underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* new lines  */

/* --- Careon Redesign Custom CSS --- */

/* Mega Menu Active States (Controlled by your JS) */
.gnc-lvl2-btn {
  position: relative;
  transition: all 0.2s ease-in-out;
}

/* When JS adds .is-active to the sidebar button */
.gnc-lvl2-btn.is-active {
  color: #e11d48; /* Performance Blue */
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-weight: 800;
}

.gnc-lvl2-btn.is-active .gnc-arrow {
  transform: translateX(4px);
  color: #e11d48;
}

/* Hide panels by default, show when active */
.gnc-panel {
  display: none;
  animation: fadeIn 0.3s ease-out forwards;
}

.gnc-panel.is-active {
  display: block;
}

/* Smooth Fade In for Mega Menu Content */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav Item Underline Hover Effect */
.nav-link-hover {
  position: relative;
}
.nav-link-hover::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #e11d48;
  transition: width 0.3s ease;
}
.nav-link-hover:hover::after {
  width: 100%;
}

/* --- Careon Redesign Custom CSS (Part 2) --- */

/* Mobile Menu Drawer Enhancements */
.gnc-mob-panel {
  transition: all 0.3s ease-in-out;
}
.gnc-mob-btn[aria-expanded="true"] {
  color: #e11d48; /* brand-red (Performance Blue) */
  background-color: #eef2f7; /* brand-soft */
  border-radius: 0.5rem;
}
.gnc-mob-btn[aria-expanded="true"] .gnc-arrow {
  transform: rotate(180deg);
  color: #e11d48; /* brand-red */
}

/* Footer Link Hover Animations */
.footer-link-hover {
  position: relative;
  display: inline-block;
}
.footer-link-hover::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #84cc16; /* brand-teal (Fresh Lime) */
  transition: width 0.3s ease;
}
.footer-link-hover:hover::after {
  width: 100%;
}
.footer-link-hover:hover {
  color: #ffffff;
}
