/* Druid Float Bar — front-end */

.dfb-root {
  --dfb-primary: #023894;
}

.dfb-float-bar {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 4px 160px;
  scrollbar-width: thin;
}

.dfb-float-bar::-webkit-scrollbar {
  width: 4px;
}

.dfb-float-bar::-webkit-scrollbar-thumb {
  background: #c5c9d1;
  border-radius: 4px;
}

.dfb-item {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}

.dfb-link {
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
  height: 44px;
  text-decoration: none;
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s ease;
  background: var(--brand, var(--dfb-primary));
  line-height: 1;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.dfb-link:hover,
.dfb-link:focus-visible {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  outline: none;
}

.dfb-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.dfb-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.dfb-label {
  display: inline-flex;
  align-items: center;
  height: 44px;
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding-left: 0;
  padding-right: 0;
  transition: max-width 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
}

.dfb-link:hover .dfb-label,
.dfb-link:focus-visible .dfb-label {
  max-width: 160px;
  opacity: 1;
  padding-left: 14px;
  padding-right: 2px;
}

.dfb-fab {
  display: none;
  position: fixed;
  z-index: 10001;
  right: 16px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--dfb-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(2, 56, 148, 0.35);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.dfb-fab svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

.dfb-fab .dfb-fab-close {
  display: none;
}

.dfb-fab.is-open .dfb-fab-open {
  display: none;
}

.dfb-fab.is-open .dfb-fab-close {
  display: block;
}

.dfb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 9998;
}

.dfb-overlay.is-open {
  display: block;
}

.dfb-more-wrap {
  display: none;
}

.dfb-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  max-height: 75vh;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.dfb-sheet.is-open {
  transform: translateY(0);
}

.dfb-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.dfb-sheet-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
}

.dfb-sheet-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
}

.dfb-sheet-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dfb-sheet-list {
  overflow-y: auto;
  padding: 8px 12px 24px;
  -webkit-overflow-scrolling: touch;
}

.dfb-sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: #1a1a2e;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.dfb-sheet-row:hover,
.dfb-sheet-row:active {
  background: #f3f4f6;
}

.dfb-sheet-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  background: var(--brand, var(--dfb-primary));
}

.dfb-sheet-ico svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* —— Mobile ≤640px —— */
@media (max-width: 640px) {
  .dfb-link,
  .dfb-icon,
  .dfb-label {
    height: 40px;
  }

  .dfb-icon {
    width: 40px;
  }

  .dfb-icon svg {
    width: 20px;
    height: 20px;
  }

  .dfb-label {
    display: none;
  }

  /* Strategy A */
  .dfb-strategy-a_fab .dfb-float-bar {
    right: 8px;
    top: auto;
    bottom: 84px;
    transform: none;
    max-height: calc(100vh - 120px);
    gap: 6px;
    padding: 4px 0 4px 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .dfb-strategy-a_fab .dfb-float-bar.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .dfb-strategy-a_fab .dfb-fab {
    display: inline-flex;
  }

  /* Strategy B */
  .dfb-strategy-b_primary .dfb-float-bar {
    right: 8px;
    top: auto;
    bottom: 16px;
    transform: none;
    max-height: calc(100vh - 32px);
    gap: 6px;
    padding: 4px 0 4px 8px;
  }

  .dfb-strategy-b_primary .dfb-extra-item {
    display: none;
    order: 0;
  }

  .dfb-strategy-b_primary .dfb-float-bar.is-open .dfb-extra-item {
    display: flex;
  }

  .dfb-strategy-b_primary .dfb-primary-whatsapp {
    order: 1;
  }

  .dfb-strategy-b_primary .dfb-primary-email {
    order: 2;
  }

  .dfb-strategy-b_primary .dfb-primary-phone {
    order: 3;
  }

  .dfb-strategy-b_primary .dfb-more-wrap {
    display: flex;
    order: 4;
  }

  .dfb-strategy-b_primary .dfb-more-btn.is-open {
    background: #374151 !important;
  }

  /* Strategy C */
  .dfb-strategy-c_sheet .dfb-float-bar {
    display: none !important;
  }

  .dfb-strategy-c_sheet .dfb-fab {
    display: inline-flex;
  }

  .dfb-strategy-c_sheet .dfb-sheet {
    display: flex;
  }
}

@media (min-width: 641px) {
  .dfb-more-wrap {
    display: none !important;
  }

  .dfb-fab {
    display: none !important;
  }

  .dfb-sheet {
    display: none !important;
  }

  .dfb-overlay {
    display: none !important;
  }
}
