/* ═══════════════════════════════════════════════════════════════
   RF TOGGLE — EN/ID language switcher
   Shared across index, about, portfolio, services, blog,
   pricelist, contact. Light theme only.
   ═══════════════════════════════════════════════════════════════ */

.rf-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rf-tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 30px;
  border: 1.5px solid #E2E2F0;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(8px);
  color: #0E0F11;
  font-family: 'Onest', 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .3s, background .3s, color .3s;
  padding: 0;
}

.rf-tg:focus-visible {
  outline: 2px solid #7463FF;
  outline-offset: 2px;
}

/* --- language segmented control --- */
.rf-tg-lang {
  position: relative;
  gap: 0;
  padding: 3px;
  overflow: hidden;
}

.rf-tg-lang span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 100%;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 30px;
  color: #66666C;
  transition: color .32s;
  user-select: none;
}

.rf-tg-lang span.on {
  color: #fff;
}

.rf-tg-lang::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  width: 34px;
  height: calc(100% - 6px);
  border-radius: 30px;
  background: linear-gradient(120deg, #7463FF, #9585FF);
  transition: transform .34s cubic-bezier(.16, 1, .3, 1);
}

.rf-tg-lang[data-lang="id"]::after {
  transform: translateX(34px);
}

.rf-tg-lang:hover {
  border-color: #7463FF;
}

/* --- mobile: sits inside the burger dropdown --- */
.rf-tools-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 18px;
  border-top: 1px solid #E2E2F0;
  margin-top: 6px;
}

.rf-tools-mobile .rf-tools-label {
  font-size: 13px;
  font-weight: 500;
  color: #66666C;
}

@media (max-width: 1199px) {
  .rf-tools-desktop {
    display: none;
  }

  .rf-tools-mobile {
    display: flex;
  }
}

/* index.html uses the template header — nudge spacing there */
.tp-header-10-right .rf-tools {
  margin-left: 14px;
}

@media (max-width: 575px) {
  .tp-header-10-right .rf-tools {
    margin-left: 8px;
  }

  .rf-tg-lang {
    height: 36px;
  }
}

/* ---------------------------------------------------------------
   LANGUAGE — hide the inactive copy, no layout shift
   --------------------------------------------------------------- */
[data-rf-id] {
  transition: opacity .18s ease;
}

/* avoid a flash of untranslated content before JS boots */
html:not(.rf-i18n-ready) [data-rf-lang="id"] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {

  .rf-tg,
  .rf-tg-lang::after,
  .rf-tg-lang span,
  [data-rf-id] {
    transition: none !important;
  }
}

/* print: no toggles */
@media print {
  .rf-tools {
    display: none !important;
  }
}
