/* HiredMA UI Enhancements */

/* Scroll progress bar */
#hma-scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--hma-primary, #1456ff);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Off-canvas overlay */
.hma-offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 9997;
}

.hma-offcanvas-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Off-canvas menu */
.hma-offcanvas-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 280px;
  max-width: 80%;
  height: 100%;
  background: var(--hma-bg, #f5f7fb);
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
  z-index: 9998;
  transition: right 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
}

.hma-offcanvas-menu.is-active {
  right: 0;
}

.hma-offcanvas-inner {
  margin-top: 1rem;
}

.hma-offcanvas-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  align-self: flex-end;
}

.hma-offcanvas-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hma-offcanvas-nav li {
  margin-bottom: 0.75rem;
}

.hma-offcanvas-nav a {
  text-decoration: none;
  color: var(--hma-text, #1b1f2a);
  font-weight: 500;
}

/* Mobile toggle button (hamburger) */
.hma-mobile-menu-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 20px;
  padding: 0;
}

.hma-mobile-menu-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--hma-text, #1b1f2a);
  border-radius: 999px;
}

/* Topbar */
.hma-dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-radius: var(--hma-card-radius, 12px);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.25rem;
}

.hma-dashboard-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--hma-text, #1b1f2a);
  opacity: 0.8;
}

.hma-dashboard-role {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.hma-dashboard-home-link {
  text-decoration: none;
  color: var(--hma-primary, #1456ff);
  font-weight: 500;
}

.hma-dashboard-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hma-topbar-icon-link {
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hma-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--hma-text, #1b1f2a);
  position: relative;
}

/* Simple bell & message glyphs */
.hma-icon-bell::before,
.hma-icon-messages::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 2px solid var(--hma-primary, #1456ff);
}

/* Account dropdown */
.hma-topbar-account {
  position: relative;
}

.hma-topbar-account-toggle {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.hma-topbar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--hma-primary, #1456ff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.hma-topbar-name {
  font-size: 0.9rem;
}

.hma-topbar-caret {
  font-size: 0.7rem;
}

.hma-topbar-account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 180px;
  background: #fff;
  border-radius: var(--hma-card-radius, 12px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
  padding: 0.4rem;
  display: none;
  z-index: 30;
}

.hma-topbar-account-menu.is-open {
  display: block;
}

.hma-topbar-account-item {
  display: block;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--hma-text, #1b1f2a);
  border-radius: 8px;
}

.hma-topbar-account-item:hover {
  background: rgba(20,86,255,0.06);
}

/* Micro-interactions */

.hma-card {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.hma-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(15,23,42,0.10);
}

.hma-btn,
button.hma-btn,
a.hma-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.hma-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15,23,42,0.18);
}

.hma-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(15,23,42,0.16);
}

/* Reveal animation */
.hma-reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hma-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Form focus */
.hma-form input[type="text"],
.hma-form input[type="email"],
.hma-form input[type="password"],
.hma-form input[type="number"],
.hma-form select,
.hma-form textarea {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.hma-form input:focus,
.hma-form select:focus,
.hma-form textarea:focus {
  outline: none;
  border-color: var(--hma-primary, #1456ff);
  box-shadow: 0 0 0 1px rgba(20,86,255,0.35);
  background: #fff;
}

/* Media: hide hamburger on large screens (theme can override) */
@media (min-width: 960px) {
  .hma-mobile-menu-toggle {
    display: none;
  }
}
