/*
Theme CSS entry: components.css
Reusable UI pieces that are not page-specific.
*/

/* RDBK Utilities */

.rdbk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  line-height: 1;
}

.rdbk-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rdbk-mobile-only {
  display: none;
}

/* RDBK Actions */
.rdbk-desktop-actions,
.rdbk-mobile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rdbk-button {
  position: relative;
  isolation: isolate;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: var(--rdbk-radius-pill);
  overflow: hidden;
  font-size: 14px;
  font-weight: 790;
  letter-spacing: -.012em;
  white-space: nowrap;
  transition:
    transform var(--rdbk-move),
    background-color var(--rdbk-move),
    color var(--rdbk-move),
    box-shadow var(--rdbk-move);
}

.rdbk-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--rdbk-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--rdbk-move);
}

.rdbk-button:hover,
.rdbk-button:focus-visible {
  transform: translateY(-2px);
}

.rdbk-button:hover::before,
.rdbk-button:focus-visible::before {
  transform: scaleX(1);
}

.rdbk-button-dark {
  background: var(--rdbk-ink);
  color: var(--rdbk-white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.rdbk-button-dark:hover,
.rdbk-button-dark:focus-visible {
  box-shadow: 0 14px 34px rgba(36, 92, 255, .22);
}

.rdbk-button-light {
  background: var(--rdbk-white);
  color: var(--rdbk-ink);
}

.rdbk-button-light:hover,
.rdbk-button-light:focus-visible,
.rdbk-button-soft:hover,
.rdbk-button-soft:focus-visible {
  color: var(--rdbk-white);
}

.rdbk-button-soft {
  background: var(--rdbk-paper-strong);
  color: var(--rdbk-ink);
}

.rdbk-button .rdbk-icon {
  font-size: 13px;
}

.rdbk-button-arrow {
  transform: translateY(2px) rotate(-45deg);
  transition: transform var(--rdbk-move);
}

.rdbk-button:hover .rdbk-button-arrow,
.rdbk-button:focus-visible .rdbk-button-arrow {
  transform: translateY(1px) rotate(0deg);
}

/* RDBK Language Switch */
.rdbk-lang-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 116px;
  min-height: 44px;
  padding: 4px;
  border-radius: var(--rdbk-radius-pill);
  background: var(--rdbk-paper);
}

.rdbk-lang-option {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--rdbk-radius-pill);
  color: var(--rdbk-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
  transition: color var(--rdbk-fast);
}

.rdbk-lang-option:hover {
  color: var(--rdbk-ink);
}

.rdbk-lang-option:focus-visible,
.rdbk-lang-option.rdbk-is-active {
  color: var(--rdbk-white);
}

.rdbk-lang-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: var(--rdbk-radius-pill);
  background: var(--rdbk-ink);
  transition:
    transform var(--rdbk-move),
    background-color var(--rdbk-move);
}

.rdbk-lang-switch.rdbk-lang-en-active .rdbk-lang-thumb {
  transform: translateX(0);
}

.rdbk-lang-switch.rdbk-lang-fr-active .rdbk-lang-thumb {
  transform: translateX(100%);
}

.rdbk-lang-switch:hover .rdbk-lang-thumb {
  background: var(--rdbk-blue);
}

/* RDBK Added Utilities */
.rdbk-hidden {
  display: none !important;
}

.rdbk-text-center {
  text-align: center;
}

.rdbk-pill {
  border-radius: var(--rdbk-radius-pill);
}

.rdbk-soft-surface {
  background: var(--rdbk-paper);
  border-radius: var(--rdbk-radius-md);
}

.rdbk-no-scroll {
  overflow: hidden;
}

@media (max-width: 991px) {
  .rdbk-mobile-only {
    display: block;
  }

  .rdbk-desktop-only {
    display: none !important;
  }
}
