﻿/*
 * Shared header treatment for the three Filipino learning modules.
 * The starpath-page-nav class also tells feedback-ui.js that navigation
 * is already present, preventing its additional home/star controls.
 */

.site-header {
  width: min(1120px, calc(100vw - 36px));
  justify-content: flex-start;
}

.site-header .module-home-nav {
  position: relative;
  inset: auto;
  width: 58px;
  flex: 0 0 58px;
  justify-content: flex-start;
  gap: 0;
  margin: 0 20px 0 0;
  padding: 0;
}

.site-header .module-home-button {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  background: #051632;
  border-color: rgba(255, 255, 255, .22);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.site-header .module-home-button img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.site-header .module-home-button:hover,
.site-header .module-home-button:focus-visible {
  border-color: #d8a84d;
  box-shadow: 0 0 16px rgba(216, 168, 77, .2);
  transform: scale(1.05);
}

.site-header .module-header-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 14px;
  margin-left: 24px;
}

.site-header .back-filipino-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: white;
  background: var(--purple);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--purple-dark);
  font: 800 14px "Nunito", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}

.site-header .back-filipino-button:hover,
.site-header .back-filipino-button:focus-visible {
  transform: translateY(-2px);
}

.site-header .back-filipino-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--purple-dark);
}

.site-header .voice-gender-selector {
  flex: 0 0 auto;
  margin: 0;
}

.site-header .sound-button {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 640px) {
  .site-header .module-home-nav {
    position: relative !important;
    inset: auto !important;
    width: 48px;
    flex-basis: 48px;
    justify-content: flex-start;
    gap: 0;
    margin: 0 12px 0 0;
    padding: 0;
  }

  .site-header .module-home-button {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .site-header .module-header-controls {
    gap: 8px;
    margin-left: 12px;
  }

  .site-header .sound-button {
    min-width: 40px;
  }
}

@media (max-width: 620px) {
  .site-header .module-home-nav {
    width: 40px;
    flex-basis: 40px;
    margin-right: 6px;
  }

  .site-header .module-home-button {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .site-header .module-header-controls {
    gap: 3px;
    margin-left: 4px;
  }

  .site-header .back-filipino-button {
    width: 92px;
    min-height: 38px;
    padding: 0 5px;
    border-radius: 12px;
    box-shadow: 0 4px 0 var(--purple-dark);
    font-size: 9px;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .site-header .voice-gender-selector button {
    padding: 6px;
  }

  .site-header .sound-button {
    min-width: 62px;
    padding: 7px 6px;
    font-size: 10px;
  }

  .site-header .sound-label {
    display: inline;
  }
}


