/**
 * Call Now Button - Mobile Full Width
 * Frontend Styles
 */

:root {
  --cnb-bg-color: #00c853;
  --cnb-text-color: #ffffff;
  --cnb-z-index: 999999;
}

#cnb-container {
  position: fixed;
  z-index: var(--cnb-z-index, 999999);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#cnb-container * {
  box-sizing: border-box;
}

/* Floating positions (Desktop & default mobile when not full width) */
#cnb-container.cnb-pos-bottom-right {
  bottom: 24px;
  right: 24px;
}

#cnb-container.cnb-pos-bottom-left {
  bottom: 24px;
  left: 24px;
}

#cnb-container.cnb-pos-bottom-center {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}

/* Base button styles */
.cnb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  background-color: var(--cnb-bg-color, #00c853);
  color: var(--cnb-text-color, #ffffff) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cnb-btn:hover,
.cnb-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  filter: brightness(1.05);
}

.cnb-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Icon & Text layout */
.cnb-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cnb-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.cnb-text {
  margin-left: 10px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Icon-only circular button */
#cnb-container.cnb-icon-only .cnb-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
}

#cnb-container.cnb-icon-only .cnb-icon {
  width: 26px;
  height: 26px;
}

/* Device Visibility rules */
@media screen and (min-width: 769px) {
  #cnb-container.cnb-vis-mobile_only {
    display: none !important;
  }
}

@media screen and (max-width: 768px) {
  #cnb-container.cnb-vis-desktop_only {
    display: none !important;
  }
}

/* ========================================================
   KEY FEATURE: Full Width on Mobile View (< 768px)
   ======================================================== */
@media screen and (max-width: 768px) {
  #cnb-container.cnb-mobile-fullwidth {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #cnb-container.cnb-mobile-fullwidth .cnb-btn {
    width: 100% !important;
    height: 56px !important;
    border-radius: 0 !important;
    padding: 0 16px !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15) !important;
    font-size: 17px !important;
    transform: none !important;
  }

  #cnb-container.cnb-mobile-fullwidth .cnb-btn:hover,
  #cnb-container.cnb-mobile-fullwidth .cnb-btn:focus {
    transform: none !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.22) !important;
  }

  #cnb-container.cnb-mobile-fullwidth .cnb-icon {
    width: 24px !important;
    height: 24px !important;
  }

  #cnb-container.cnb-mobile-fullwidth .cnb-text {
    font-size: 17px !important;
    margin-left: 10px !important;
  }
}

/* ========================================================
   FEATURE: Desktop Phone Icon Only (Mobile Label)
   ======================================================== */
@media screen and (min-width: 769px) {
  #cnb-container.cnb-desktop-icon-only .cnb-btn {
    width: 56px !important;
    height: 56px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  #cnb-container.cnb-desktop-icon-only .cnb-text {
    display: none !important;
  }

  #cnb-container.cnb-desktop-icon-only .cnb-icon-box {
    margin: 0 !important;
  }

  #cnb-container.cnb-desktop-icon-only .cnb-icon {
    width: 26px !important;
    height: 26px !important;
  }
}
