/*
  =====================================================================
 501-php-01-language-switcher — Extracted CSS
  =====================================================================

  RESPONSIVE BREAKPOINTS:
    - Default (mobile):  column layout, donate stacks on top
    - ≥768px (tablet):   row layout, space-between, items vertically centered
    - ≥1024px (desktop): row layout, justified flex-end, gap via --grid-gutter
  =====================================================================
*/


/* --------------------------------------------------------------------
   LIGHT-THEME — no variable overrides needed.
   The :root tokens above are already the light values, so
   .ui-footer-actions inherits them directly.
   -------------------------------------------------------------------- */

.language-selector {
position: relative;
  width: auto;
}

.dropdown {
top: 100%;
left: 0;
}

/*
.lang-btn {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 14px;
background: white;
border-radius: 2px;
cursor: pointer;
border: 1px solid #ddd;
transition: 0.2s;
}
*/


.lang-btn {
height: 61px;
box-sizing: border-box;
display: inline-flex;
align-items: center;
padding: 0 16px;
justify-content: space-between;
gap: 8px;
background: transparent;
border: 2px solid #ffff;
border-radius: 0px;
color: #ffff;
}

.lang-btn:hover {
border-color: #fff;
}

.arrow {
transition: transform 0.3s ease;
}

.arrow.rotate {
transform: rotate(180deg);
}


.arrow {
display: flex;
align-items: center;
}

.arrow svg {
display: block;
}

.arrow svg path {
stroke: white;
}

.dropdown {
position: absolute;
left: 0;
width: 100%;
background: white;
border-radius: 2px;
border: 1px solid #ddd;
box-shadow: 0 10px 25px rgba(0,0,0,0.08);
opacity: 0;
transform: translateY(-10px);
pointer-events: none;
transition: 0.25s ease;
}

.dropdown.show {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}

.option {
padding: 10px 14px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
transition: 0.2s;
/* .option is now an <a> language link — strip default anchor styling. */
text-decoration: none;
color: #101828;
}

.option:hover {
background: #f2f4f7;
}

.option.active {
font-weight: 700;
}



/* --------------------------------------------------------------------
   LANGUAGE SWITCHER WRAPPER — .ui-footer-language
   -------------------------------------------------------------------- */
.ui-footer-language {
  position: relative;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------
   LANGUAGE PLACEHOLDER BOX — .language-placeholder
   An empty square box with the original border style.
   Content to be replaced in the future.
   -------------------------------------------------------------------- */
.language-placeholder {
  /* Square proportions — adjust size as needed */
  width: 40px;
  height: 40px;

  /* Border matches the language switcher styling from the original */
  border: 2px solid var(--m24-off-black);

  /* Square corners — matching the original selector's border-radius: 0 */
  border-radius: 0;

  /* Transparent interior — nothing inside yet */
  background: transparent;

  display: block;
  box-sizing: border-box;

  /* Subtle hover cue so the placeholder reads as interactive */
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.language-placeholder:hover {
  border-color: var(--m24-black);
}

/* ====================================================================
   RESPONSIVE LANGUAGE TAB — .lang-sidebar
   --------------------------------------------------------------------
   Floating "linguetta" shown only on iPad and below. The breakpoint
   (≤1023px) matches 01-php-01-supermenu's desktop/responsive split, so
   the tab appears exactly when the menu collapses to its mobile layout.

   Colour matches the sergioguidotti source (red, #d8362c) and stays
   themeable: set --lang-tab-bg globally to recolour it to your own brand.
   ==================================================================== */

/* Hidden by default; only revealed inside the responsive breakpoint below. */
.lang-sidebar {
  display: none;
}

@media screen and (max-width: 1023px) {

  /* On responsive the desktop dropdown is replaced by the floating tab.
     Remove this rule if you'd rather keep both switchers visible. */
  .language-selector {
    display: none;
  }

  .lang-sidebar {
    position: fixed;
    right: 0;
    top: 65%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    pointer-events: none;
  }

  .lang-sidebar > * {
    pointer-events: auto;
  }

  .lang-sidebar-toggle {
    background: var(--lang-tab-bg, #d8362c);
    color: #fff;
    border: none;
    padding: 12px 10px;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
    transition: padding 0.3s ease;
  }

  .lang-sidebar.active .lang-sidebar-toggle {
    padding-left: 15px;
  }

  .lang-sidebar-icon {
    width: 20px;
    height: 20px;
    display: block;
  }

  .lang-sidebar-toggle span {
    font-size: 10px;
    font-weight: 800;
  }

  .lang-sidebar-content {
    background: #fff;
    padding: 15px;
    border-radius: 12px 0 0 12px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-right: -45px;
    min-width: 60px;
    align-items: center;
  }

  .lang-sidebar.active .lang-sidebar-content {
    transform: translateX(0);
  }

  .lang-sidebar-content a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
  }

  .lang-sidebar-content a:hover,
  .lang-sidebar-content a.active {
    background: #fde7e4;
    color: var(--lang-tab-bg, #d8362c);
  }
}

