/* ===== NEW MENU CSS ===== */
/* Mobile Menu Styling for new_menu.php */

/* Header alignment */
.header_wrap .header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

/* Desktop header navigation alignment */
.header_wrap .header .header_nav {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  flex-wrap: nowrap !important;
  margin-top: 0 !important;
}

.header_wrap .header .header_nav .select_drop {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  max-width: 100px !important;
}

.header_wrap .header .header_nav .select_drop > a {
  font-size: 13px !important;
  padding: 6px 24px 6px 10px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  display: inline-block !important;
}

.header_wrap .header .header_nav .select_drop > ul {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  margin-top: 5px !important;
  min-width: 100% !important;
  z-index: 1000 !important;
}

.header_wrap .header .user-nav {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

.header_wrap .header .user-nav .user-display {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 6px 12px !important;
  background: transparent !important;
}

.header_wrap .header .user-nav .user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #e0e0e0 !important;
  flex-shrink: 0 !important;
}

.header_wrap .header .user-nav .user-name-text {
  font-size: 14px !important;
  color: #333 !important;
  font-weight: 500 !important;
  font-family: "Open Sans", Arial, sans-serif !important;
}

/* Notification badge styling */
.header_wrap .header .header_notification {
  position: relative !important;
  display: inline-block !important;
}

.header_wrap .header .header_notification .notify-num {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  background: #e23d46 !important;
  color: #fff !important;
  font-size: 11px !important;
  min-width: 18px !important;
  height: 18px !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-family: "Open Sans", Arial, sans-serif !important;
  padding: 0 4px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.header_wrap .header .user-photo {
  display: inline-flex !important;
  align-items: center !important;
}

.header_wrap .header .header_notification {
  display: inline-flex !important;
  align-items: center !important;
}

/* Header Logo Styling - Override common.css */
.header_wrap .header h1 {
  margin: 0 !important;
  padding: 0 !important;
  padding-left: 0 !important;
  font-size: inherit !important;
  display: flex !important;
  align-items: center !important;
}

.header_wrap .header h1 a.logo-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  transition: opacity 0.2s ease;
  background: none !important;
  background-image: none !important;
  text-indent: 0 !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
  padding-left: 0 !important;
  margin: 0 !important;
  font-size: 0 !important;
  line-height: normal !important;
  min-width: 200px !important;
}

.header_wrap .header h1 a.logo-link:hover {
  opacity: 0.8;
}

.header_wrap .header h1 .logo-image {
  height: 40px !important;
  width: auto !important;
  display: block !important;
}

.header_wrap .header h1 .logo-text {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  visibility: visible !important;
  opacity: 1 !important;
}

.header_wrap .header h1 .brand-name {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #333 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.5px !important;
  text-indent: 0 !important;
  display: block !important;
}

.header_wrap .header h1 .brand-tagline {
  font-size: 9px !important;
  font-weight: 400 !important;
  color: #666 !important;
  line-height: 1.2 !important;
  text-transform: uppercase;
  letter-spacing: 0.3px !important;
  text-indent: 0 !important;
  display: block !important;
}

/* Dark theme for logo */
.dark-theme .header_wrap .header h1 .brand-name {
  color: #5a9cff !important;
}

.dark-theme .header_wrap .header h1 .brand-tagline {
  color: #999 !important;
}

/* Mobile Controls Layout */
.mobile-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 60px); /* Leave space for menu icon */
  max-width: calc(100% - 60px);
  padding: 15px 20px;
  border-bottom: 1px solid #e9ecef;
  justify-content: space-between;
}

/* Mobile Menu Logo */
.mobile-menu-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-logo-img {
  height: 35px;
  width: auto;
  object-fit: contain;
}

.mobile-menu-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-menu-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.mobile-menu-brand-tagline {
  font-size: 8px;
  font-weight: 400;
  color: #666;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.select_drop {
  flex: 0 1 auto;
  width: 100px;
  max-width: 100px; /* Limit language dropdown width */
  min-width: 70px;
  margin-left: auto;
}

/* Mobile Language Dropdown */
.mobile-language-dropdown {
  position: relative;
  width: 100%;
}

.mobile-language-toggle {
  width: 100%;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  font-family: "Open Sans", Arial, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: space-between;
  height: 28px;
  box-sizing: border-box;
}

.mobile-language-toggle:hover {
  background-color: #fff;
  border-color: #004ebf;
}

.mobile-language-toggle:focus {
  outline: 2px solid #004ebf;
  outline-offset: 2px;
  border-color: #004ebf;
}

.mobile-language-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-language-text {
  font-weight: 500;
  flex-grow: 1;
  text-align: center;
  line-height: 1;
}

.mobile-language-arrow {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.mobile-language-dropdown.active .mobile-language-arrow {
  transform: rotate(180deg);
}

.mobile-language-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-language-dropdown.active .mobile-language-menu {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}

.mobile-language-menu li {
  margin: 0;
  padding: 0;
}

.mobile-language-menu-item {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.mobile-language-menu-item:hover {
  background-color: #f8f9fa;
  color: #004ebf;
}

.mobile-language-menu-item.selected {
  background-color: #004ebf;
  color: #fff;
}

/* Mobile Notification */
.mobile-notification {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-notification-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  /* background: rgba(0, 78, 191, 0.1); */
  color: #004ebf;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 40px;
  width: 40px;
}

.mobile-notification-link:hover {
  background: rgba(0, 78, 191, 0.15);
  transform: translateY(-1px);
}

.mobile-notification-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.mobile-notification-link .notify-num {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  background: #e23d46 !important;
  color: #fff !important;
  font-size: 10px !important;
  min-width: 16px !important;
  height: 16px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-family: "Open Sans", Arial, sans-serif !important;
  padding: 0 3px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Dark theme styles for mobile notification */
.dark-theme .mobile-notification-link {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dark-theme .mobile-notification-link:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Dark theme styles for mobile language dropdown */
.dark-theme .mobile-language-toggle {
  background: #2d2d2d;
  border-color: #4a4a4a;
  color: #fff;
}

.dark-theme .mobile-language-toggle:hover {
  background: #3a3a3a;
  border-color: #5a9cff;
}

.dark-theme .mobile-language-menu {
  background: #2d2d2d;
  border-color: #4a4a4a;
}

.dark-theme .mobile-language-menu-item {
  color: #fff;
}

.dark-theme .mobile-language-menu-item:hover {
  background-color: #3a3a3a;
  color: #5a9cff;
}

.dark-theme .mobile-language-arrow {
  color: #ccc;
}

/* Mobile controls responsive adjustments */
@media (max-width: 480px) {
  .mobile-controls {
    gap: 8px;
    padding: 12px 0px;
    width: calc(100% - 70px); /* More space for menu icon on small screens */
    max-width: calc(100% - 70px);
  }

  .mobile-menu-logo-img {
    height: 30px;
  }

  .mobile-menu-brand-name {
    font-size: 12px;
  }

  .mobile-menu-brand-tagline {
    font-size: 7px;
  }

  .select_drop {
    max-width: calc(100% - 150px);
  }

  .mobile-language-toggle {
    font-size: 13px;
    padding: 4px 4px;
    height: 28px;
  }

  .mobile-notification-link {
    padding: 6px;
    height: 36px;
    width: 36px;
  }

  .mobile-notification-icon {
    width: 18px;
    height: 18px;
  }
}

/* Ensure mobile controls take full width */
.top_nav {
  width: 100%;
}

.mobile_gnb_list {
  width: 100%;
}

/* Fix any potential z-index issues */
.mobile-language-dropdown {
  z-index: 1000;
}

.mobile-language-menu {
  z-index: 1001;
}

/* Responsive adjustments for header navigation */
@media (max-width: 768px) {
  /* Hide desktop language selector on mobile - user can change in slide menu */
  .header_wrap .header .header_nav > .select_drop {
    display: none !important;
  }

  .header_wrap .header .header_nav {
    max-width: 50% !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }

  .header_wrap .header .header_nav .select_drop {
    max-width: 100px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .header_wrap .header .header_nav .select_drop a {
    font-size: 13px !important;
    padding: 6px 24px 6px 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    display: inline-block !important;
    position: relative !important;
  }

  .header_wrap .header .user-nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 1 !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .header_wrap .header .user-nav .user-display {
    padding: 4px 8px !important;
    gap: 8px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: 150px !important;
  }

  .header_wrap .header .user-nav .select_drop {
    max-width: 80px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .header_wrap .header .user-nav .user-avatar {
    width: 28px !important;
    height: 28px !important;
  }

  .header_wrap .header .user-nav .user-name-text {
    font-size: 13px !important;
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .header_wrap .header .user-photo {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }

  .header_wrap .header .user-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .header_wrap .header .header_notification {
    padding: 6px !important;
    flex-shrink: 0 !important;
  }

  .header_wrap .header .header_notification img {
    width: 20px !important;
    height: 20px !important;
  }

  .header_wrap .header h1 .logo-image {
    height: 32px !important;
  }

  .header_wrap .header h1 .brand-name {
    font-size: 14px !important;
  }

  .header_wrap .header h1 .brand-tagline {
    font-size: 8px !important;
  }

  .header_wrap .header .gnb {
    display: none !important;
  }
}

/* ===== MOBILE SLIDE MENU NAVIGATION STYLES ===== */
/* Match my_account.php mobile menu style with icons */

.gnb_area .oneD a {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  padding: 15px 20px !important;
}

.gnb_area .menu-icon {
  font-size: 24px !important;
  flex-shrink: 0 !important;
  width: 30px !important;
  text-align: center !important;
}

.gnb_area .menu-text {
  flex: 1 !important;
  font-size: 15px !important;
  color: #333 !important;
  font-weight: normal !important;
  text-align: left !important;
}

.gnb_area .oneD a:hover {
  background: #f8f9fa !important;
}

.gnb_area .oneD a.logout-link {
  color: #e23d46 !important;
}

.gnb_area .oneD a.logout-link:hover {
  background: #fff5f5 !important;
}

.gnb_area .oneD a.logout-link .menu-text {
  color: #e23d46 !important;
}

/* Hide hamburger menu on my_account.php */
body[data-page="my_account"] .header_wrap .hamburger,
body[data-page="my_account"] .header_wrap .mobile_gnb_open_btn {
  display: none !important;
}

/* Show hamburger menu on desktop for logged-in users in new_menu.php */
.header_wrap .hamburger,
.header_wrap .mobile_gnb_open_btn,
.header_wrap .mobile_gnb {
  display: block !important;
}

/* Force show hamburger on all screen sizes including > 1024px */
@media (min-width: 1025px) {
  .header_wrap .mobile_gnb_open_btn,
  .header_wrap .mobile_gnb {
    display: block !important;
  }
}

/* Align header_nav to right when hamburger is hidden */
body[data-page="my_account"] .header_wrap .header_nav {
  margin-right: -48px !important;
  justify-content: flex-end !important;
}

.new_menu_top_nav {
  padding: 0 8px !important;
}

/* Language selector full/short text display */
/* Default: show full text, hide short text */
.lang-full {
  display: inline;
}

.lang-short {
  display: none;
}

/* Show short language text on mobile devices (slide menu only) */
@media (max-width: 768px) {
  .mobile-menu-overlay .lang-full,
  .gnb_wrap .lang-full,
  .mobile_gnb_list .lang-full {
    display: none !important;
  }

  .mobile-menu-overlay .lang-short,
  .gnb_wrap .lang-short,
  .mobile_gnb_list .lang-short {
    display: inline !important;
  }

  .mobile-language-toggle {
    padding: 6px 10px;
    width: 70px;
  }
}

/* ===== Language Selector Styles ===== */
.language-dropdown {
  position: relative;
  display: inline-block;
}

.language-toggle {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-size: 1.4rem;
  color: #333;
  font-family: "Open Sans", Arial, sans-serif;
  width: 70px;
  justify-content: space-between;
  padding: 4px 10px;
  height: 32px;
}

.language-toggle:hover {
  border-color: #004ebf;
  background: #f8f9fa;
}

.language-toggle:focus {
  outline: 2px solid #004ebf;
  outline-offset: 2px;
  border-color: #004ebf;
}

.language-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.language-text {
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1;
}

.language-arrow {
  font-size: 1rem;
  color: #666;
  transition: transform 0.2s ease;
  line-height: 1;
}

.language-dropdown.active .language-arrow {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1001;
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.language-dropdown.active .language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.language-menu-item {
  display: block;
  padding: 10px 12px;
  color: #333;
  text-decoration: none;
  font-size: 1.4rem;
  transition: background 0.2s ease;
  font-family: "Open Sans", Arial, sans-serif;
}

.language-menu-item:hover {
  background: #f8f9fa;
  color: #004ebf;
}

.language-menu-item.selected {
  background: #004ebf;
  color: #fff;
}

/* Show short language text on desktop/tablet */
.lang-full {
  display: none;
}

.lang-short {
  display: inline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .language-toggle {
    width: 60px;
    padding: 4px 8px;
  }
}
