/* Anywhere Networks portal theme. The colours match the website, and the palette
   itself is in partner_portal/_theme_head.html. */

body {
  font-family: "Inter", sans-serif;
  background-color: #F5F8FA;
  color: #0E1F2F;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
}

.card {
  background: #FFFFFF;
  border: 1px solid #DDE5EB;
  border-radius: 1rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: #0E1F2F;
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #3D4EFF;
}

.btn-secondary,
.btn-outline {
  border: 1px solid #DDE5EB;
  color: #0E1F2F;
}

.btn-secondary:hover,
.btn-outline:hover {
  border-color: #00A8CC;
  color: #027A99;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background-color: rgba(0, 168, 204, 0.1);
  color: #027A99;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

:focus-visible {
  outline: 2px solid #00A8CC;
  outline-offset: 2px;
}

/* Not Tailwind's hidden: the document library's stylesheets force .hidden to none. */
.portal-sidebar,
.portal-desktop,
.portal-back {
  display: none;
}

@media (min-width: 640px) {
  .portal-back { display: inline; }
}

@media (min-width: 768px) {
  .portal-sidebar { display: flex; }
  .portal-desktop { display: block; }
}

/* One trail under the header on every page. */
.portal-crumbs-bar {
  padding: 10px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid #DDE5EB;
}

@media (min-width: 768px) {
  .portal-crumbs-bar { padding: 10px 40px; }
}

.portal-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
  color: #5F7381;
}

.portal-crumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.portal-crumbs li + li::before {
  content: "/";
  color: #A9B8C3;
}

.portal-crumbs a,
.portal-crumbs span {
  display: block;
  max-width: 280px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-crumbs a {
  color: #5F7381;
}

.portal-crumbs a:hover {
  color: #027A99;
  text-decoration: underline;
}

.portal-crumbs [aria-current="page"] {
  font-weight: 500;
  color: #0E1F2F;
}

details.portal-menu > summary,
details.portal-profile > summary {
  list-style: none;
  cursor: pointer;
}

details.portal-menu > summary::-webkit-details-marker,
details.portal-profile > summary::-webkit-details-marker {
  display: none;
}

/* The account menu opens with a short fade and its chevron turns. */
details.portal-profile[open] .portal-profile-panel {
  animation: portal-drop 140ms ease-out;
}

.portal-profile-chevron {
  transition: transform 140ms ease;
}

details.portal-profile[open] .portal-profile-chevron {
  transform: rotate(180deg);
}

@keyframes portal-drop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* A slim scrollbar on the dark menu that only shows while the pointer is over it. */
.portal-sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 200ms ease;
}

.portal-sidebar-scroll:hover,
.portal-sidebar-scroll:focus-within {
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.portal-sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.portal-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.portal-sidebar-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.portal-sidebar-scroll:hover::-webkit-scrollbar-thumb,
.portal-sidebar-scroll:focus-within::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}

.portal-sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
