/* =====================================================
   LANGUAGE WIDGET — fixed vertical widget, right edge
   Globe icon + PT/EN/ES flag buttons
   ===================================================== */

.lang-widget {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  background: #1a1a2e;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lang-widget-globe {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  margin-bottom: 2px;
}

.lang-widget-globe svg {
  width: 18px;
  height: 18px;
  display: block;
}

.lang-widget-flag {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #0f0f1e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-widget-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-widget-flag:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.lang-widget-flag:focus-visible {
  outline: 2px solid #cc3366;
  outline-offset: 2px;
}

.lang-widget-flag.active {
  border-color: #cc3366;
  box-shadow: 0 0 0 3px rgba(204, 51, 102, 0.35), 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: scale(1.06);
}

/* Mobile: shrink, keep fully on-screen, and stay dimmed until touched */
@media (max-width: 767px) {
  .lang-widget {
    right: 10px;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 20px;
    opacity: 0.4;
    transition: opacity 0.25s ease;
  }

  .lang-widget:active,
  .lang-widget:focus-within,
  .lang-widget.is-visible {
    opacity: 1 !important;
  }

  .lang-widget-globe {
    width: 26px;
    height: 26px;
  }

  .lang-widget-globe svg {
    width: 15px;
    height: 15px;
  }

  .lang-widget-flag {
    width: 30px;
    height: 30px;
  }
}
