/* MakeArt Class Tools shared header - v2
 * Include this stylesheet in <head> of phone.php and each class tool.
 * Header is rendered by class_header.php inside <body>.
 * Scope all rules to .ma-class-header to avoid changing the existing site menus.
 */

.ma-class-header,
.ma-class-header * {
  box-sizing: border-box;
}

.ma-class-header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e0e7e4;
  color: #1d252c;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  z-index: 10;
}

.ma-class-header__inner {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding: 12px 20px;
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.ma-class-header__brand {
  flex: 0 1 180px;
  min-width: 0;
  display: flex;
  align-items: center;
}

.ma-class-header__logo {
  display: block;
  width: 170px;
  max-width: 100%;
  height: 44px;
  object-fit: contain;
  object-position: left center;
}

.ma-class-header__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 12px;
  min-height: 42px;
  border: 1px solid #dce5e1;
  border-radius: 10px;
  background: #f8faf9;
  color: #1d252c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.ma-class-header__back:hover {
  background: #e8f2ee;
  border-color: #b7cfc5;
  color: #1d252c;
  text-decoration: none;
}

.ma-class-header__back:focus-visible {
  outline: 3px solid #006b5b;
  outline-offset: 3px;
}

.ma-class-header__back svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* The launcher is the destination of the Back link, so hide that link there. */
body.phone-home .ma-class-header__back {
  display: none;
}

body.phone-home .ma-class-header__inner {
  width: min(100%, 590px);
  padding-inline: 22px;
}

@media (max-width: 360px) {
  .ma-class-header__inner {
    padding-inline: 14px;
    gap: 9px;
  }

  .ma-class-header__logo {
    width: 130px;
    height: 38px;
  }

  .ma-class-header__back {
    padding: 8px 9px;
    font-size: 12px;
  }

  body.phone-home .ma-class-header__inner {
    padding-inline: 15px;
  }
}
