/* Variable Global */
:root {
  /* Color */
  --primary-color: rgba(0, 82, 156, 1);

  /* Font size */
  --font-size-title: 18px;
  --font-size-text: 16px;
  --font-size-small: 14px;
  --font-size-mini: 12px;

  /* Space */
  --space-mini: 4px;
  --space-small: 8px;
  --space-medium: 16px;
  --space-large: 24px;

  /* Font-weight */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MYRIADPRO-REGULAR.OTF") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MyriadPro-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MYRIADPRO-SEMIBOLD.OTF") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Myriad Pro";
  src: url("../font/MYRIADPRO-BOLD.OTF") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Base Styles */
body {
  font-family: "Myriad Pro", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.instruction__logo {
  text-align: center;
  padding: var(--space-medium);
  background: #fff;
}

.instruction__logo img {
  max-width: 100%;
  height: auto;
}

/* Main Container */
.main-container {
  display: flex;
  min-height: calc(100vh - 200px);
  max-width: 1200px;
  margin: 0 auto;
  gap: var(--space-large);
  align-items: flex-start;
}

html {
  scroll-behavior: smooth;
}

/* Sidebar Styles */
.sidebar {
  width: 320px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
}

/* Search Input */
.sidebar__search {
  position: relative;
  padding: var(--space-medium);
  border-bottom: 1px solid #e0e0e0;
}

.sidebar__search-input {
  width: 100%;
  padding: var(--space-small) var(--space-medium) var(--space-small)
    var(--space-small);
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: var(--font-size-text);
  outline: none;
  transition: border-color 0.2s;
}

.sidebar__search-input:focus {
  border-color: var(--primary-color);
}

.sidebar__search-icon {
  position: absolute;
  right: calc(var(--space-medium) + var(--space-small));
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

/* Navigation */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-small) 0;
}

.sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Sidebar Items */
.sidebar__item {
  margin: 0;
}

.sidebar__link {
  display: block;
  padding: var(--space-small) calc(var(--space-medium) * 2) var(--space-small)
    var(--space-medium);
  color: #333;
  text-decoration: none;
  font-size: var(--font-size-text);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  position: relative;
}

.sidebar__link:hover {
  background-color: #f5f5f5;
}

.sidebar__item.active > .sidebar__link,
.sidebar__subitem.active > .sidebar__sublink,
.sidebar__subsubitem.active > .sidebar__subsublink {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: var(--font-weight-medium);
}

/* Dropdown arrow icons - only show when active */
.sidebar__item--has-children.active > .sidebar__link::after,
.sidebar__subitem--has-children.active > .sidebar__sublink::after {
  content: "";
  position: absolute;
  right: var(--space-medium);
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-30%) rotate(225deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* Sub Items */
.sidebar__sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #f9f9f9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.sidebar__item--has-children.active > .sidebar__sublist,
.sidebar__subitem--has-children.active > .sidebar__subsublist,
.sidebar__sublist.show,
.sidebar__subsublist.show {
  max-height: 800px;
}

.sidebar__subitem {
  margin: 0;
}

.sidebar__sublink {
  display: block;
  padding: var(--space-small) var(--space-medium) var(--space-small)
    calc(var(--space-medium) * 2);
  color: #555;
  text-decoration: none;
  font-size: var(--font-size-small);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.sidebar__sublink:hover {
  background-color: #f0f0f0;
}

/* Sub Sub Items */
.sidebar__subsublist {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #f0f0f0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.sidebar__subsubitem {
  margin: 0;
}

.sidebar__subsublink {
  display: block;
  padding: var(--space-small) var(--space-medium) var(--space-small)
    calc(var(--space-medium) * 3);
  color: #666;
  text-decoration: none;
  font-size: var(--font-size-small);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.sidebar__subsublink:hover {
  background-color: #e8e8e8;
}

/* Content Area */
.content {
  flex: 1;
  padding: var(--space-large);
  background: #fafafa;
}

.content__section {
  max-width: 800px;
  margin: 0 auto var(--space-large);
}

.content__section h2 {
  font-size: var(--font-size-title);
  color: var(--primary-color);
  margin-bottom: var(--space-medium);
  font-weight: var(--font-weight-medium);
}

.content__section p {
  font-size: var(--font-size-text);
  color: #333;
  margin-bottom: var(--space-medium);
  line-height: 1.8;
  font-weight: var(--font-weight-normal);
}

/* Accessibility table */
.accessibility-table-wrapper {
  margin-top: var(--space-large);
  overflow-x: auto;
}

.accessibility-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-small);
}

.accessibility-table th,
.accessibility-table td {
  border: 1px solid #d0d0d0;
  padding: 10px 16px;
  vertical-align: middle;
}

.accessibility-table thead th {
  background-color: #f5f5f5;
  font-weight: var(--font-weight-medium);
  text-align: center;
}

.accessibility-table tbody td:first-child {
  font-weight: var(--font-weight-medium);
}

.accessibility-table .center {
  text-align: center;
}

.instruction__appWrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.instruction__appWrapper-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.instruction__appWrapper-app img {
  width: 200px;
  height: auto;
}

.instruction--link-qr {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.instruction--link-qr img {
  width: 150px;
  height: auto;
}

.instruction-link {
  text-decoration: none;
}

.primary-highlight {
  color: var(--primary-color);
}

.text-bold {
  font-style: bold;
  font-weight: var(--font-weight-bold);
}

/* Class text-primary-color */
.text-primary-color {
  color: var(--primary-color);
}

/* Ghi đè box-shadow của Tailwind shadow-md */
.shadow-md {
  box-shadow: none !important;
}
