/* ---------------------------------------------------
   1. BASE STYLES & VARIABLES
--------------------------------------------------- */
:root {
  --primary-color: #007bff;
  --primary-color-hover: #0056b3;
  --text-color-light: #fff;
  --text-color-dark: #333;
  --border-color: #e0e0e0;
  --background-color-chat: #f9f9f9;
  --bot-message-bg: #e9e9eb;
  --nav-width-desktop: 220px;
  --mobile-header-height: 60px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: var(--text-color-light);
  color: var(--text-color-dark);
}

.main-wrapper { display: flex; flex-direction: row; }
.container { max-width: 800px; flex-grow: 1; padding: 1em 2em; }
section { border-bottom: 1px solid var(--border-color); padding: 1.5rem 0; scroll-margin-top: 70px; }
section:last-of-type { border-bottom: none; }
h1 { border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
h2 { margin-top: 0; }
a, a:visited { color: #0000EE; text-decoration: underline; }
a:hover { color: #551A8B; }
.video-container { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; margin: 1rem 0; border-radius: 8px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ---------------------------------------------------
   2. SITE HEADER & NAVIGATION (Desktop)
--------------------------------------------------- */
.site-header { display: flex; justify-content: center; padding: .5em; border-bottom: 1px solid var(--border-color); }
.logo { height: 40px; width: auto; }
#table-of-contents { width: var(--nav-width-desktop); position: sticky; top: 0; height: 100vh; background: #f8f9fa; border-right: 1px solid var(--border-color); padding: 1rem; overflow-y: auto; flex-shrink: 0; }
#table-of-contents ul { list-style: none; padding: 0; margin: 0; }
#table-of-contents li a { display: block; padding: 0.5rem; text-decoration: none; color: var(--text-color-dark); border-radius: 4px; }
#table-of-contents li a:hover { background-color: #e9ecef; }
/* **FIX: Styles for new desktop logos** */
.desktop-logo-container {
  display: none; /* Hide on mobile by default */
}

.main-content-logo {
  padding-bottom: 1rem;
  text-align: center;
}
.main-content-logo .logo {
  height: 50px;
}

/* ---------------------------------------------------
   3. CHAT WIDGET
--------------------------------------------------- */
#chat-launcher { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; background-color: var(--primary-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 4px 8px rgba(0,0,0,0.2); z-index: 1000; }

#chat-widget { 
  position: fixed; 
  bottom: 20px; 
  right: 20px; 
  width: 350px; 
  max-width: 90vw; 
  height: 500px; 
  max-height: 70vh; 
  background-color: var(--text-color-light); 
  border-radius: 10px; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
  z-index: 1000; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease-in, opacity 0.3s ease-in, visibility 0s linear 0.3s;
}

html.chat-open #chat-widget {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#chat-header { background-color: var(--primary-color); color: var(--text-color-light); padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
#chat-close { background: transparent; border: 0; color: var(--text-color-light); font-size: 20px; cursor: pointer; }
#chat-input-container { display: flex; border-top: 1px solid var(--border-color); padding: 10px; background: #fff; }
#chat-widget #user-input { flex-grow: 1; border: 1px solid #ccc; border-radius: 20px; padding: 8px 15px; margin-right: 10px; font-size: 16px; }
#chat-widget #send-btn { background: var(--primary-color); color: var(--text-color-light); border: none; border-radius: 20px; padding: 8px 15px; cursor: pointer; }
#chat-box { flex-grow: 1; padding: 15px; overflow-y: auto; background-color: var(--background-color-chat); display: flex; flex-direction: column; gap: 12px; }
#chat-box p { margin: 0; line-height: 1.4; }
.message-bubble { padding: 10px 15px; border-radius: 18px; max-width: 80%; width: fit-content; }
.bot-message { background-color: var(--bot-message-bg); color: var(--text-color-dark); align-self: flex-start; border-bottom-left-radius: 4px; }
.user-message { background-color: var(--primary-color); color: var(--text-color-light); align-self: flex-end; border-bottom-right-radius: 4px; }
.timestamp {
  font-size: 0.75rem;
  color: #666;
  margin-top: 8px; /* Reset margin */
  margin-bottom: -8px; /* Pull the message bubble closer */
}
.user-message + .timestamp {
  align-self: flex-end;
  margin-right: 15px;
}
.bot-message + .timestamp {
  align-self: flex-start;
  margin-left: 15px;
}

/* ---------------------------------------------------
   4. RESPONSIVE & MOBILE STYLES
--------------------------------------------------- */
.mobile-header { display: none; }

@media (min-width: 769px) {
  .desktop-logo-container {
    display: block; /* Show on desktop */
  }

  #table-of-contents .desktop-logo-container {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
  }

  #table-of-contents .desktop-logo-container .logo {
    max-width: 80%;
    height: auto;
  }
}

@media (max-width: 768px) {
  /* Scroll lock for modals on mobile */
  html.nav-open, body.nav-open, body.chat-open {
    overflow: hidden;
  }

  .site-header { display: none; }
  .mobile-header { display: flex; justify-content: space-between; align-items: center; background: #fff; border-bottom: 1px solid var(--border-color); padding: 0 1rem; height: var(--mobile-header-height); position: sticky; top: 0; z-index: 999; }
  .main-wrapper { flex-direction: column; }
  .container { padding: 1em; }
  
  #table-of-contents { position: fixed; top: 0; left: 0; width: 250px; height: 100%; z-index: 1001; transform: translateX(-100%); transition: transform 0.3s ease-in-out; border-right: 1px solid var(--border-color); }
  #table-of-contents.nav-open { transform: translateX(0); }
  #nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out, visibility 0.3s; }
  #nav-overlay.nav-open { opacity: 1; visibility: visible; }
  #hamburger-btn { background: none; border: none; cursor: pointer; padding: 10px; display: flex; flex-direction: column; justify-content: space-around; width: 30px; height: 30px; }
  #hamburger-btn span { display: block; width: 100%; height: 2px; background-color: var(--text-color-dark); }

  /* **FIX: Center the logo in the mobile header** */
  .mobile-header > a {
    text-align: center;
    flex-grow: 1; /* Allows the logo's link to take up the middle space */
  }

  #chat-widget {
    /* Fullscreen Takeover */
    inset: 0; /* Modern shorthand for top: 0, right: 0, bottom: 0, left: 0 */
    width: 100%;
    height: 100%; /* Works with dynamic viewport units */
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    
    /* Animation: Slide up from the bottom */
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    
    /* Flexbox Layout for fullscreen chat */
    display: flex;
    flex-direction: column;
    background: var(--text-color-light);
  }

  /* --- ADD this new rule for the open state --- */
  html.chat-open #chat-widget {
    transform: translateY(0);
  }

  /* --- BUG FIX: Restore column-reverse --- */
  #chat-box {
    flex: 1 1 auto;
    overflow-y: auto; /* Enable native scrolling */
    padding: 15px;
    display: flex;
    flex-direction: column-reverse; /* This is the key fix */
    gap: 12px;
  }
  
  #chat-input-container {
    /* This container stays fixed at the bottom */
    flex-shrink: 0;
  }

  /* --- ADD this rule to prevent background scroll --- */
  html.chat-open, body.chat-open {
    overflow: hidden;
  }
}

/* ---------------------------------------------------
   5. PRINT STYLES
--------------------------------------------------- */
@media print {
  body { color: #000 !important; }
  .site-header, .mobile-header, #table-of-contents, #chat-launcher, #chat-widget, #nav-overlay { display: none !important; }
  .main-wrapper { display: block; }
  section { break-inside: avoid; page-break-inside: avoid; }
  a { text-decoration: none; }
}

/* ---------------------------------------------------
   6. HOME ASSISTANT DASHBOARD STYLES
--------------------------------------------------- */
#ha-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
  margin-top: 2rem;
}

.ha-card {
  flex: 1 1 180px; /* Flex-grow, flex-shrink, basis */
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ha-card-title {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0 0 0.5rem 0;
  font-weight: bold;
}

.ha-card-status {
  font-size: 1.75rem;
  font-weight: bold;
  transition: color 0.3s ease-in-out;
  flex-grow: 1; /* Allows it to take up available vertical space */
  display: flex;
  align-items: center; /* Vertically centers the text */
  justify-content: center; /* Horizontally centers the text */
}

/* ---------------------------------------------------
   6. HOME ASSISTANT DASHBOARD STYLES
--------------------------------------------------- */
#ha-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

.ha-card {
  flex: 1 1 180px; /* Flex-grow, flex-shrink, basis */
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ha-card-title {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0 0 0.5rem 0;
  font-weight: bold;
  text-align: center;
}

.ha-card-status {
  font-size: 1.75rem;
  font-weight: bold;
  text-align: center;
  margin-top: auto; /* Pushes status to bottom */
  transition: color 0.3s ease-in-out;
}

/* Specific styles for the weather card */
.weather-card {
    flex-basis: 100%; /* Make weather card take full width on small screens */
    min-width: 280px;
}

@media (min-width: 600px) {
  .weather-card {
    flex-basis: 300px;
  }
}


.weather-forecast {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.forecast-day {
    flex: 1;
}

.forecast-day-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #6c757d;
}

.forecast-day-icon {
    font-size: 1.5rem;
    font-family: "Material Symbols Outlined";
    margin: 0.25rem 0;
}

.forecast-day-temp {
    font-size: 0.85rem;
}

.forecast-day-temp-low {
    color: #6c757d;
}



.hourly-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.hourly-icon {
    font-size: 1.75rem;
    font-family: "Material Symbols Outlined";
    margin: 0.25rem 0;
}

.hourly-temp {
    font-size: 0.9rem;
    font-weight: bold;
}

/* --- NEW STYLES for the combined weather row --- */

/* This is the main flex container for the top row */
.weather-top-row {
    display: flex;
    justify-content: space-around; /* Evenly spaces all items */
    align-items: stretch; /* Makes all items equal height */
    text-align: center;
    gap: 0.5rem; /* Adds a little space between items */
    margin-bottom: 1rem;
}

/* A generic class for all items in the top row */
.weather-item {
    display: flex;
    flex-direction: column;
    flex: 1; /* Allows items to grow and fill the space */
}

/* Specific styling for the "Now" item to make it stand out */
.current-weather-item {
    font-weight: bold;
}

/* A generic label for the time/day (e.g., "Now", "21:00") */
.weather-item-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

/* A generic icon style for all top-row items */
.weather-item-icon {
    font-size: 2.25rem; /* Unified icon size */
    font-family: "Material Symbols Outlined";
    margin: 0.25rem 0;
    flex-grow: 1; /* Allows icon to take up vertical space */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* A generic temperature style for all top-row items */
.weather-item-temp {
    font-size: 1.25rem;
}

/* --- Remove old styles for these selectors --- */
/* .weather-main { ... }                  <-- DELETE THIS */
/* .weather-hourly-forecast { ... }       <-- DELETE THIS */
/* .hourly-item { ... }                   <-- DELETE THIS (and its sub-rules) */
/* .weather-icon { ... }                  <-- DELETE THIS */
/* .weather-temp { ... }                  <-- DELETE THIS */

/* ---------------------------------------------------
   7. HOME ASSISTANT CLIMATE CONTROLS (v2 - Slider)
--------------------------------------------------- */
.climate-card {
  flex-basis: 100%;
  gap: 1rem;
}

.climate-entity {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.climate-card .climate-entity:first-of-type {
  border-top: none;
  padding-top: 0;
}

.climate-name {
  font-weight: bold;
  font-size: 1.1rem;
  grid-column: 1 / 2;
}

.climate-current-temp {
  font-size: 0.9rem;
  color: #6c757d;
  grid-column: 1 / 2;
}

.climate-set-temp-display {
  grid-row: 1 / 3;
  grid-column: 2 / 3;
  font-size: 2.25rem;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.climate-slider-container {
  grid-column: 1 / 3;
  width: 100%;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 5px;
  outline: none;
  opacity: 0.7;
  transition: opacity .2s;
}
input[type="range"]:hover {
  opacity: 1;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Style for the input container when the bot is replying */
#chat-input-container.loading #user-input,
#chat-input-container.loading #send-btn {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none; /* This prevents clicks and taps */
}

/* --- Add these styles to the end of style.css --- */

/* Make the widget visible and structured on the dedicated chat page */
body.chat-page #chat-widget {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  /* Override any hiding/transform styles */
  visibility: visible;
  opacity: 1;
  transform: none;
}

/* Ensure flex layout works correctly on the dedicated page */
body.chat-page #chat-box {
  flex: 1 1 auto;
  overflow-y: auto;
}
body.chat-page #chat-input-container {
  flex-shrink: 0;
}

/* Style for the new back button in the chat header */
#chat-back-btn {
  color: var(--text-color-light);
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
}
#chat-back-btn:hover {
  text-decoration: underline;
}

/* Adjust header for the back button */
#chat-header {
  justify-content: space-between;
}

#chat-header {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between; /* This is the key change */
  align-items: center;
  font-weight: bold;
  flex-shrink: 0; /* Prevents header from shrinking */
}

/* --- Adjust chat close button visibility --- */
#chat-header #chat-close {
  display: block; /* Ensure it's visible by default on desktop */
}

/* Inside the main mobile media query */
@media (max-width: 768px) {
  /* ... other mobile styles are already here ... */

  /* HIDE the close button ONLY on mobile, where it's not needed */
  #chat-header #chat-close {
    display: none;
  }
  
  /* ... other mobile styles continue ... */
}

/* --- Add these styles for the new input container to style.css --- */
#chat-input-container {
  display: flex;
  align-items: center; /* Vertically align items */
  padding: 8px;
  gap: 8px;
}

#chat-input-container #chat-back-btn {
  color: #555;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
#chat-input-container #chat-back-btn:hover {
  color: #000;
}

#chat-input-container #user-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 16px;
  margin: 0;
}

#chat-input-container #send-btn {
  background: var(--primary-color);
  color: var(--text-color-light);
  border: none;
  border-radius: 50%; /* Make it a circle */
  width: 44px;  /* Fixed width */
  height: 44px; /* Fixed height */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0; /* Prevent the button from shrinking */
}


/* ---------------------------------------------------
   8. HOME ASSISTANT LIGHT CONTROLS (v2.1 - Refined)
--------------------------------------------------- */
.light-control-card {
  flex: 1 1 220px;
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.light-control-header {
  display: flex;
  justify-content: space-between; /* Pushes name left, toggle right */
  align-items: center;
}

.light-control-name {
  font-weight: bold;
  font-size: 1.1rem;
}

/* --- The normally-proportioned switch --- */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(22px);
  -ms-transform: translateX(22px);
  transform: translateX(22px);
}

input:disabled + .slider {
  cursor: not-allowed;
  opacity: 0.5;
}
/* --- End of switch styles --- */

.light-slider-group {
  display: none; /* Hidden by default, shown by JS */
  flex-direction: column;
  gap: 0.5rem;
}

.light-slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.light-slider-row .material-symbols-outlined {
  color: #6c757d;
  font-size: 20px;
}

.light-slider-row input[type="range"] {
  flex-grow: 1;
  height: 6px;
}

.light-slider-value {
  font-size: 0.8rem;
  color: #6c757d;
  min-width: 40px;
  text-align: right;
}

/* --- Add these styles to the end of the file --- */

.light-unavailable-notice {
  /* Hidden by default */
  display: none; 
  
  /* Styling for the notice */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.light-unavailable-notice .material-symbols-outlined {
  font-size: 28px;
}

/* --- STATE-BASED VISIBILITY CONTROL --- */

/* When the card has the .is-unavailable class, HIDE the normal controls */
.light-control-card.is-unavailable .light-controls-wrapper {
  display: none;
}

/* When the card has the .is-unavailable class, SHOW the notice */
.light-control-card.is-unavailable .light-unavailable-notice {
  display: flex;
}

/* --- Styles for Light Refresh Button --- */
.light-header-controls {
  display: flex;
  align-items: center;
  gap: 12px; /* Space between refresh button and toggle */
}

.light-refresh-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.light-refresh-btn:hover {
  background-color: rgba(0,0,0,0.05);
  color: #333;
}

/* Animation for the spinning icon */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.light-control-card.is-refreshing .light-refresh-btn .material-symbols-outlined {
  animation: spin 1s linear infinite;
}

.light-control-card.is-refreshing .light-refresh-btn {
  pointer-events: none; /* Disable clicking while refreshing */
}

/* --- 9. CHATBOT SUGGESTION CHIPS --- */

.suggestions-container {
  display: flex;
  flex-wrap: wrap; /* Allows buttons to wrap to the next line on small screens */
  gap: 8px; /* Space between buttons */
  justify-content: flex-start; /* Align buttons to the left */
  padding: 5px 0 10px 0; /* Some spacing around the container */
  max-width: 100%;
}

.suggestion-chip {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.suggestion-chip:hover {
  background-color: #f0f0f0;
  border-color: #aaa;
}

/* --- 10. LANGUAGE PICKER STYLES --- */

/* Container styles */
#language-picker-desktop-container {
  padding: 0 0.5rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

#language-picker-mobile-container {
  display: flex;
  align-items: center;
  margin-right: 0.5rem; /* Space between picker and hamburger */
}

/* Common select styles */
#language-picker-desktop-container select,
#language-picker-mobile-container select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27292.4%27%20height%3D%27292.4%27%3E%3Cpath%20fill%3D%27%23666%27%20d%3D%27M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%27%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7em top 50%, 0 0;
  background-size: 0.65em auto, 100%;
}

#language-picker-mobile-container select {
  font-size: 0.8rem;
  padding: 0.4rem 1.5rem 0.4rem 0.5rem; /* Make room for arrow */
  max-width: 120px;
}