/* ============================================================================
              Header Component Styles
============================================================================ */

.login-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  font-family: "Amalia", "Open Sans", Arial, sans-serif;
}

.login-header-wrap {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  height: 56px;
  position: relative;
}

.login-header-brand {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  line-height: 0;
  font-size: 0;
}

.login-header-logo {
  height: 100%;
  width: auto;
  display: block;
}

.login-header-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: #2b2d33;
  margin: 0;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.login-header-actions {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-left: 1px solid #e0e0e0;
  height: 100%;
  position: absolute;
  right: 0;
  z-index: 2;
}

/* Header Responsive Breakpoints */
@media (max-width: 480px) {
  .login-header-wrap {
    height: 48px;
  }

  .login-header-title {
    font-size: 1rem;
  }

  .login-header-actions {
    padding: 0 0.5rem;
  }

  .lang-btn {
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 481px) and (max-width: 979px) {
  .login-header-wrap {
    height: 52px;
  }

  .login-header-title {
    font-size: 1.0625rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .lang-option:focus-visible {
    outline: 2px solid currentColor;
  }
}

/* Forced colors mode (Windows High Contrast) */
@media (forced-colors: active) {
  .lang-option:focus-visible {
    outline: 2px solid CanvasText;
  }
}

.language-selector {
  position: relative;
  display: inline-block;
}

.language-selector-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  color: rgba(43, 45, 51, 1);
  font-family: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
  width: 100%;
  height: 100%;
}

.language-selector-button:hover {
  opacity: 0.8;
}

.language-selector-button:focus {
  outline: none;
}

.language-selector-button:active {
  opacity: 0.9;
}

.flag-icon {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.language-name {
  flex: 0;
  text-align: left;
}

.dropdown-arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #6b7280;
  transition: transform 0.2s ease;
}

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

.language-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.language-selector.open .language-dropdown {
  display: block;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  color: #374151;
  font-size: 14px;
}

.language-option:hover {
  background-color: #f3f4f6;
}

.language-option.selected {
  background-color: #eff6ff;
  color: #374151;
}

.language-option .flag-icon {
  width: 24px;
  height: 18px;
}

/* Mobile Language Selection */
@media (max-width: 768px) {
  .language-selector-button {
    padding: 6px 10px;
    font-size: 13px;
  }
  .language-option {
    padding: 8px 12px;
    font-size: 13px;
  }
}
