/* JP-style header top bar utilities (scoped to .bt-jp-header-top / mobile drawer)
 * Keep VN + JP copies in sync. */

.bt-jp-header-top {
  border-bottom: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.bt-jp-header-top .bt-jp-header-top__inner {
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1140px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  width: 100% !important;
}

/* Right actions hug content; stay inside 1140 container */
.bt-jp-header-top .bt-jp-header-top__actions {
  align-items: center !important;
  display: flex !important;
  flex: 0 0 auto !important;
  gap: 0.25rem;
  margin-left: auto;
  max-width: 100%;
  min-width: 0;
  width: auto !important;
}

@media (min-width: 768px) {
  .bt-jp-header-top .bt-jp-header-top__actions {
    gap: 0.75rem;
  }
}

/* Search toggle: don't let wrapper stretch / misalign vertically */
.bt-jp-header-top .bt-jp-header-top__actions > .relative {
  align-items: center !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  height: 36px !important;
  line-height: 1 !important;
  min-height: 0 !important;
  width: 36px !important;
  max-width: 36px !important;
}

.bt-jp-header-top [data-search-toggle] {
  align-items: center !important;
  box-sizing: border-box;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  height: 36px !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 8px !important;
  width: 36px !important;
}

.bt-jp-header-top .bt-jp-header-top__actions > .relative,
.bt-jp-header-top .bt-jp-header-top__actions > a,
.bt-jp-header-top .bt-jp-header-top__actions > div {
  align-self: center !important;
}

.bt-jp-header-top .bg-white { background-color: #fff; }
.bt-jp-header-top .border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.bt-jp-header-top .border-r { border-right-width: 1px; border-right-style: solid; }
.bt-jp-header-top .border { border-width: 1px; border-style: solid; }
.bt-jp-header-top .border-gray-200 { border-color: #e5e7eb; }

.bt-jp-header-top .mx-auto { margin-left: auto; margin-right: auto; }
.bt-jp-header-top .px-4 { padding-left: 1rem; padding-right: 1rem; }
.bt-jp-header-top .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.bt-jp-header-top .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.bt-jp-header-top .p-2 { padding: 0.5rem; }
.bt-jp-header-top .p-6 { padding: 1.5rem; }
.bt-jp-header-top .pr-4 { padding-right: 1rem; }
.bt-jp-header-top .mr-2 { margin-right: 0.5rem; }
.bt-jp-header-top .mb-6 { margin-bottom: 1.5rem; }
.bt-jp-header-top .-ml-2 { margin-left: -0.5rem; }

.bt-jp-header-top .h-16 { height: 4rem; }
.bt-jp-header-top .h-8 { height: 2rem; }
.bt-jp-header-top .h-9 { height: 2.25rem; }
.bt-jp-header-top .h-4 { height: 1rem; }
.bt-jp-header-top .h-5 { height: 1.25rem; }
.bt-jp-header-top .h-6 { height: 1.5rem; }
.bt-jp-header-top .w-4 { width: 1rem; }
.bt-jp-header-top .w-5 { width: 1.25rem; }
.bt-jp-header-top .w-6 { width: 1.5rem; }
.bt-jp-header-top .w-48 { width: 12rem; }
.bt-jp-header-top .w-auto { width: auto; }
.bt-jp-header-top .w-full { width: 100%; }
.bt-jp-header-top .w-\[300px\] { width: 300px; }

.bt-jp-header-top .flex { display: flex; }
.bt-jp-header-top .inline-flex { display: inline-flex; }
.bt-jp-header-top .flex-1 { flex: 1 1 0%; }
.bt-jp-header-top .flex-col { flex-direction: column; }
.bt-jp-header-top .items-center { align-items: center; }
.bt-jp-header-top .justify-between { justify-content: space-between; }
.bt-jp-header-top .justify-end { justify-content: flex-end; }
.bt-jp-header-top .gap-1 { gap: 0.25rem; }
.bt-jp-header-top .gap-2 { gap: 0.5rem; }

.bt-jp-header-top .relative { position: relative; }
.bt-jp-header-top .absolute { position: absolute; }
.bt-jp-header-top .fixed { position: fixed; }
.bt-jp-header-top .inset-y-0 { top: 0; bottom: 0; }
.bt-jp-header-top .left-0 { left: 0; }
.bt-jp-header-top .left-1\/2 { left: 50%; }
.bt-jp-header-top .right-0 { right: 0; }
.bt-jp-header-top .top-1\/2 { top: 50%; }
.bt-jp-header-top .z-10 { z-index: 10; }
.bt-jp-header-top .z-\[60\] { z-index: 60; }

.bt-jp-header-top .-translate-x-1\/2 { transform: translateX(-50%); }
.bt-jp-header-top .-translate-y-1\/2 { transform: translateY(-50%); }
.bt-jp-header-top .absolute.left-1\/2.top-1\/2.-translate-x-1\/2.-translate-y-1\/2 {
  transform: translate(-50%, -50%);
}
.bt-jp-header-top .absolute.right-0.top-1\/2.-translate-y-1\/2 {
  transform: translateY(-50%);
}
.bt-jp-header-top .-translate-x-full { transform: translateX(-100%); }
.bt-jp-header-top .transition-transform { transition-property: transform; transition-duration: 0.2s; transition-timing-function: ease; }
.bt-jp-header-top .transition-colors { transition-property: color, background-color, border-color; transition-duration: 0.2s; transition-timing-function: ease; }
.bt-jp-header-top .group:hover .group-hover\:scale-105,
.bt-jp-header-top a.group:hover img {
  transform: scale(1.05);
}

.bt-jp-header-top .object-contain { object-fit: contain; }
.bt-jp-header-top .overflow-hidden { overflow: hidden; }
.bt-jp-header-top .overflow-y-auto { overflow-y: auto; }
.bt-jp-header-top .rounded-full { border-radius: 9999px; }
.bt-jp-header-top .rounded-md { border-radius: 0.375rem; }
.bt-jp-header-top .shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.bt-jp-header-top .shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }

.bt-jp-header-top .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.bt-jp-header-top .text-base { font-size: 1rem; line-height: 1.5rem; }
.bt-jp-header-top .text-2xl { font-size: 1.5rem; line-height: 2rem; }
.bt-jp-header-top .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.bt-jp-header-top .font-medium { font-weight: 500; }
.bt-jp-header-top .font-bold { font-weight: 700; }
.bt-jp-header-top .font-serif { font-family: var(--bt-serif, var(--font-serif, "Merriweather", Georgia, "Times New Roman", serif)); }
.bt-jp-header-top .text-gray-400 { color: #9ca3af; }
.bt-jp-header-top .text-gray-600 { color: #4b5563; }
.bt-jp-header-top .text-gray-800 { color: #1f2937; }
.bt-jp-header-top .text-gray-900 { color: #111827; }
.bt-jp-header-top .text-white { color: #fff; }
.bt-jp-header-top .hover\:text-\[\#4d0078\]:hover { color: #4d0078; }
.bt-jp-header-top .hover\:bg-gray-50:hover { background-color: #f9fafb; }
.bt-jp-header-top .hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.bt-jp-header-top .hover\:bg-\[\#7c3aed\]:hover { background-color: #7c3aed; }
.bt-jp-header-top .bg-\[\#4d0078\] { background-color: #4d0078; }
.bt-jp-header-top .bg-white { background-color: #fff; }

.bt-jp-header-top .border-0 { border-width: 0; }
.bt-jp-header-top .rounded-none { border-radius: 0; }
.bt-jp-header-top .outline-none { outline: none; }

.bt-jp-header-top a { text-decoration: none; }
.bt-jp-header-top button { background: transparent; border: 0; cursor: pointer; }

.bt-jp-header-top .bt-jp-mobile-menu {
  background: #fff;
}

.bt-jp-header-top .bt-jp-mobile-menu:not(.-translate-x-full) {
  transform: translateX(0);
}

.bt-jp-header-top .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.bt-jp-header-top .group:hover .group-hover\:text-gray-900 { color: #111827; }

.bt-jp-header-top .hidden {
  display: none !important;
  visibility: hidden !important;
}

@media (min-width: 768px) {
  .bt-jp-header-top .md\:hidden { display: none !important; visibility: hidden !important; }
  .bt-jp-header-top .md\:block,
  .bt-jp-header-top .hidden.md\:block {
    display: block !important;
    visibility: visible !important;
  }
  .bt-jp-header-top .md\:flex,
  .bt-jp-header-top .hidden.md\:flex {
    display: flex !important;
    visibility: visible !important;
  }
  .bt-jp-header-top .md\:inline,
  .bt-jp-header-top .hidden.md\:inline {
    display: inline !important;
    visibility: visible !important;
  }
  .bt-jp-header-top .md\:inline-flex,
  .bt-jp-header-top .hidden.md\:inline-flex {
    display: inline-flex !important;
    visibility: visible !important;
  }
  .bt-jp-header-top .md\:h-20 { height: 5rem; }
  .bt-jp-header-top .md\:h-10 { height: 2.5rem; }
  .bt-jp-header-top .md\:w-60 { width: 15rem; }
  .bt-jp-header-top .md\:gap-4 { gap: 1rem; }
  .bt-jp-header-top .md\:rounded-md { border-radius: 0.375rem; }
  .bt-jp-header-top .md\:px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
}

@media (max-width: 767px) {
  .bt-jp-header-top .md\:flex,
  .bt-jp-header-top .md\:inline,
  .bt-jp-header-top .md\:inline-flex {
    display: none !important;
    visibility: hidden !important;
  }
}

/* Brand block — logo + wordmark + hover date (shared JP/VN) */
.bt-jp-header-top .bt-header-brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.bt-jp-header-top .bt-header-brand:hover,
.bt-jp-header-top .bt-header-brand:focus-visible {
  color: inherit;
  text-decoration: none;
}

.bt-jp-header-top .bt-header-brand__logo {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  height: 2.5rem;
  justify-content: center;
  line-height: 0;
  width: 40px;
}

.bt-jp-header-top .bt-header-brand__logo img {
  display: block;
  height: 2rem;
  margin: 0;
  max-height: 2.5rem;
  max-width: 40px;
  object-fit: contain;
  transition: transform 0.25s ease;
  width: auto;
}

@media (min-width: 768px) {
  .bt-jp-header-top .bt-header-brand__logo,
  .bt-jp-header-top .bt-header-brand__logo img {
    height: 2.5rem;
  }
}

.bt-jp-header-top .bt-header-brand:hover .bt-header-brand__logo img {
  transform: scale(1.06);
}

.bt-jp-header-top .bt-header-brand__meta {
  display: grid;
  gap: 2px;
  grid-template-rows: auto auto;
  justify-items: stretch;
  line-height: 1.2;
  text-align: center;
  width: max-content;
}

.bt-jp-header-top .bt-header-brand__name {
  color: #000;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

.bt-jp-header-top .bt-header-brand__date {
  color: #374151;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.35;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  text-align: center;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.bt-jp-header-top .bt-header-brand:hover .bt-header-brand__date {
  max-height: 1.5em;
  opacity: 1;
}

/* Fixed lang label width so 日本語 / Tiếng Việt don't shift search */
.bt-jp-header-top .bt-header-lang-label {
  box-sizing: border-box;
  display: inline-block;
  min-width: 5.75rem;
  text-align: left;
  white-space: nowrap;
}
