/* ============================= */
/* RNB Button Base */
/* ============================= */

.rnb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  width: fit-content;
  min-height: auto;
  padding: 6px 20px;

  border: 0;
  border-radius: 999px;

  text-decoration: none !important;
  line-height: 1;
  font-size: 24px;
  font-weight: 500;

  box-shadow: none;
  cursor: pointer;

  transition:
    opacity 200ms ease,
    transform 200ms ease,
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.rnb-btn:hover {
  opacity: 0.92;
  text-decoration: none !important;
}

.rnb-btn:active {
  transform: scale(0.98);
}

.rnb-btn-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

/* ============================= */
/* Icon */
/* ============================= */

.rnb-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;
  overflow: hidden;
}

.rnb-btn-icon img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ============================= */
/* Icon Position */
/* ============================= */

.rnb-btn.btn-icon-left {
  padding-top: 6px !important;
  padding-right: 20px !important;
  padding-bottom: 6px !important;
  padding-left: 6px !important;
}

.rnb-btn.btn-icon-right {
  padding-top: 6px !important;
  padding-right: 6px !important;
  padding-bottom: 6px !important;
  padding-left: 20px !important;
}

/* ============================= */
/* Shape */
/* ============================= */

/* Pill: fully rounded */
.rnb-btn--radius-pill {
  border-radius: 999px !important;
}

.rnb-btn--radius-pill .rnb-btn-icon {
  border-radius: 999px !important;
}

/* Rounded: slightly rounded depending on size */
.rnb-btn--radius-rounded {
  border-radius: 12px !important;
}

.rnb-btn--radius-rounded .rnb-btn-icon {
  border-radius: 10px !important;
}

.rnb-btn--radius-rounded.btn-sm {
  border-radius: 8px !important;
}

.rnb-btn--radius-rounded.btn-sm .rnb-btn-icon {
  border-radius: 6px !important;
}

.rnb-btn--radius-rounded.btn-lg {
  border-radius: 16px !important;
}

.rnb-btn--radius-rounded.btn-lg .rnb-btn-icon {
  border-radius: 14px !important;
}

/* Square: no rounding at all */
.rnb-btn--radius-square {
  border-radius: 0 !important;
}

.rnb-btn--radius-square .rnb-btn-icon {
  border-radius: 0 !important;
}

/* ============================= */
/* Skin Tokens */
/* ============================= */

.rnb-btn--light {
  --rnb-btn-bg: #111;
  --rnb-btn-fg: #fff;
  --rnb-btn-icon-bg: #fff;
  --rnb-btn-icon-filter: invert(0);
}

.rnb-btn--dark {
  --rnb-btn-bg: #fff;
  --rnb-btn-fg: #111;
  --rnb-btn-icon-bg: #111;
  --rnb-btn-icon-filter: invert(1);
}

/* ============================= */
/* Style: Filled */
/* ============================= */

.rnb-btn--style-filled {
  background: var(--rnb-btn-bg);
  color: var(--rnb-btn-fg) !important;
}

.rnb-btn--style-filled .rnb-btn-label {
  color: var(--rnb-btn-fg);
}

.rnb-btn--style-filled .rnb-btn-icon {
  background: var(--rnb-btn-icon-bg);
}

.rnb-btn--style-filled .rnb-btn-icon img {
  filter: var(--rnb-btn-icon-filter);
}

/* ============================= */
/* Style: Outlined */
/* ============================= */

.rnb-btn--style-outlined,
.rnb-btn--outlined {
  border: 1px solid var(--rnb-btn-bg) !important;
  background: transparent !important;
  color: var(--rnb-btn-bg) !important;
  box-shadow: none !important;
}

.rnb-btn--style-outlined .rnb-btn-label,
.rnb-btn--outlined .rnb-btn-label {
  color: var(--rnb-btn-bg) !important;
}

.rnb-btn--style-outlined .rnb-btn-icon,
.rnb-btn--outlined .rnb-btn-icon {
  border: 1px solid var(--rnb-btn-bg) !important;
  background: transparent !important;
  color: var(--rnb-btn-bg) !important;
}

.rnb-btn--style-outlined .rnb-btn-icon img,
.rnb-btn--outlined .rnb-btn-icon img {
  filter: var(--rnb-btn-icon-filter) !important;
}

/* ============================= */
/* Style: Ghost */
/* ============================= */

.rnb-btn--style-ghost,
.rnb-btn--ghost {
  border: 0 !important;
  background: transparent !important;
  color: var(--rnb-btn-bg) !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.rnb-btn--style-ghost .rnb-btn-label,
.rnb-btn--ghost .rnb-btn-label {
  color: var(--rnb-btn-bg) !important;
}

.rnb-btn--style-ghost .rnb-btn-icon,
.rnb-btn--ghost .rnb-btn-icon {
  width: auto !important;
  height: auto !important;
  flex-basis: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--rnb-btn-bg) !important;
}

.rnb-btn--style-ghost .rnb-btn-icon img,
.rnb-btn--ghost .rnb-btn-icon img {
  filter: var(--rnb-btn-icon-filter) !important;
}

/* ============================= */
/* Sizes */
/* ============================= */

.rnb-btn.btn-lg {
  font-size: 20px !important;
  gap: 20px;
}

.rnb-btn.btn-lg .rnb-btn-icon {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

.rnb-btn.btn-lg .rnb-btn-icon img {
  width: 40px;
  height: 40px;
}

.rnb-btn.btn-md {
  font-size: 16px !important;
  gap: 20px;
}

.rnb-btn.btn-md .rnb-btn-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.rnb-btn.btn-md .rnb-btn-icon img {
  width: 32px;
  height: 32px;
}

.rnb-btn.btn-sm {
  font-size: 12px !important;
  gap: 20px;
}

.rnb-btn.btn-sm .rnb-btn-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.rnb-btn.btn-sm .rnb-btn-icon img {
  width: 18px;
  height: 18px;
}

/* ============================= */
/* Width / Display */
/* ============================= */

.rnb-btn--display-block {
  display: flex;
}

.rnb-btn--wide {
  width: 100%;
}

/* ============================= */
/* Typography */
/* ============================= */

.rnb-btn--text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rnb-btn--text-none {
  text-transform: none;
}

/* ============================= */
/* Effects */
/* ============================= */

.rnb-btn--shadow {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.rnb-btn--hover-scale:hover {
  transform: scale(1.03);
}

.rnb-btn--hover-move-icon .rnb-btn-icon {
  overflow: hidden;
}

.rnb-btn--hover-move-icon .rnb-btn-icon img {
  will-change: transform;
}

.rnb-btn--hover-move-icon.btn-icon-right:hover .rnb-btn-icon img {
  animation: rnb-icon-slide-right 520ms cubic-bezier(0.4, 0, 0.2, 1);
}

.rnb-btn--hover-move-icon.btn-icon-left:hover .rnb-btn-icon img {
  animation: rnb-icon-slide-left 520ms cubic-bezier(0.4, 0, 0.2, 1);
}

.rnb-btn--icon-animation .rnb-btn-icon img {
  transition: transform 200ms ease;
}

@keyframes rnb-icon-slide-right {
  0% {
    transform: translateX(0);
  }

  42% {
    transform: translateX(140%);
  }

  43% {
    transform: translateX(-140%);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes rnb-icon-slide-left {
  0% {
    transform: translateX(0);
  }

  42% {
    transform: translateX(-140%);
  }

  43% {
    transform: translateX(140%);
  }

  100% {
    transform: translateX(0);
  }
}

/* ============================= */
/* Final Overrides: Style Wins Over Skin */
/* ============================= */

.rnb-btn.rnb-btn--style-outlined,
.rnb-btn.rnb-btn--outlined {
  background: transparent !important;
  border-style: solid !important;
  border-width: 1px !important;
  box-shadow: none !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--light,
.rnb-btn.rnb-btn--outlined.rnb-btn--light {
  border-color: #111 !important;
  color: #111 !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--light .rnb-btn-label,
.rnb-btn.rnb-btn--outlined.rnb-btn--light .rnb-btn-label {
  color: #111 !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--light .rnb-btn-icon,
.rnb-btn.rnb-btn--outlined.rnb-btn--light .rnb-btn-icon {
  background: transparent !important;
  border: 1px solid #111 !important;
  color: #111 !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--light .rnb-btn-icon img,
.rnb-btn.rnb-btn--outlined.rnb-btn--light .rnb-btn-icon img {
  filter: invert(1) !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--dark,
.rnb-btn.rnb-btn--outlined.rnb-btn--dark {
  border-color: #fff !important;
  color: #fff !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--dark .rnb-btn-label,
.rnb-btn.rnb-btn--outlined.rnb-btn--dark .rnb-btn-label {
  color: #fff !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--dark .rnb-btn-icon,
.rnb-btn.rnb-btn--outlined.rnb-btn--dark .rnb-btn-icon {
  background: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
}

.rnb-btn.rnb-btn--style-outlined.rnb-btn--dark .rnb-btn-icon img,
.rnb-btn.rnb-btn--outlined.rnb-btn--dark .rnb-btn-icon img {
  filter: invert(0) !important;
}

.rnb-btn.rnb-btn--style-ghost,
.rnb-btn.rnb-btn--ghost {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.rnb-btn.rnb-btn--style-ghost .rnb-btn-icon,
.rnb-btn.rnb-btn--ghost .rnb-btn-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  flex-basis: auto !important;
}

.rnb-btn.rnb-btn--style-ghost.rnb-btn--light,
.rnb-btn.rnb-btn--ghost.rnb-btn--light,
.rnb-btn.rnb-btn--style-ghost.rnb-btn--light .rnb-btn-label,
.rnb-btn.rnb-btn--ghost.rnb-btn--light .rnb-btn-label {
  color: #111 !important;
}

.rnb-btn.rnb-btn--style-ghost.rnb-btn--dark,
.rnb-btn.rnb-btn--ghost.rnb-btn--dark,
.rnb-btn.rnb-btn--style-ghost.rnb-btn--dark .rnb-btn-label,
.rnb-btn.rnb-btn--ghost.rnb-btn--dark .rnb-btn-label {
  color: #fff !important;
}

.rnb-btn.rnb-btn--style-ghost.rnb-btn--light .rnb-btn-icon img,
.rnb-btn.rnb-btn--ghost.rnb-btn--light .rnb-btn-icon img {
  filter: invert(1) !important;
}

.rnb-btn.rnb-btn--style-ghost.rnb-btn--dark .rnb-btn-icon img,
.rnb-btn.rnb-btn--ghost.rnb-btn--dark .rnb-btn-icon img {
  filter: invert(0) !important;
}

/* ======================================== */
/* FIX: Icon visibility for outlined / ghost */
/* ======================================== */

/* OUTLINED - LIGHT */
.rnb-btn.rnb-btn--style-outlined.rnb-btn--light .rnb-btn-icon img {
  filter: none !important;
}

/* OUTLINED - DARK */
.rnb-btn.rnb-btn--style-outlined.rnb-btn--dark .rnb-btn-icon img {
  filter: invert(1) !important;
}

/* GHOST - LIGHT */
.rnb-btn.rnb-btn--style-ghost.rnb-btn--light .rnb-btn-icon img {
  filter: none !important;
}

/* GHOST - DARK */
.rnb-btn.rnb-btn--style-ghost.rnb-btn--dark .rnb-btn-icon img {
  filter: invert(1) !important;
}

/* ======================================== */
/* FIX: Equal padding when NO icon exists */
/* ======================================== */

/* Wenn KEIN Icon vorhanden ist */
.rnb-btn.btn-icon-right:not(:has(.rnb-btn-icon)) {
  padding-right: 20px !important;
}

.rnb-btn.btn-icon-left:not(:has(.rnb-btn-icon)) {
  padding-left: 20px !important;
}
