/* ═══════════════════════════════════════════════════════════
   3D SMART SCROLL WIDGET (LEFT-SIDE FLOATING)
   ═══════════════════════════════════════════════════════════ */

.scroll-3d-widget-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 99999;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.scroll-3d-widget-container.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Floating 3D Bobbing Motion */
.scroll-3d-floating-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: widget3DFloat 3.8s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-3d-widget-container:hover .scroll-3d-floating-wrapper {
  transform: scale(1.1);
}

.scroll-3d-widget-container:active .scroll-3d-floating-wrapper {
  transform: scale(0.92);
}

/* Outer Glowing Aura matching brand theme */
.scroll-3d-aura {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.45) 0%, rgba(255, 107, 53, 0) 70%);
  animation: widget3DPulse 2.5s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

/* Circular Scroll Progress Ring */
.scroll-3d-progress-ring {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 68px;
  height: 68px;
  transform: rotate(-90deg);
  z-index: 2;
  pointer-events: none;
}

.scroll-3d-progress-bg {
  fill: none;
  stroke: rgba(255, 107, 53, 0.15);
  stroke-width: 3.5;
}

.scroll-3d-progress-bar {
  fill: none;
  stroke: url(#scroll3DGradient);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 188.5; /* 2 * PI * 30 */
  stroke-dashoffset: 188.5;
  transition: stroke-dashoffset 0.1s ease-out;
}

/* 3D Round Disc Container */
.scroll-3d-disc {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FF9E79 0%, #FF6B35 55%, #E04D16 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4),
              0 4px 12px rgba(255, 107, 53, 0.5),
              inset 0 2px 4px rgba(255, 255, 255, 0.6),
              inset 0 -3px 5px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 3;
}

/* 3D Arrow Element */
.scroll-3d-arrow-box {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 22px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Arrow rotation directions */
.scroll-3d-widget-container.direction-down .scroll-3d-arrow-box {
  transform: rotate(180deg);
}

.scroll-3d-widget-container.direction-up .scroll-3d-arrow-box {
  transform: rotate(0deg);
}

/* 3D Tooltip */
.scroll-3d-tooltip {
  position: absolute;
  left: 76px;
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  background: rgba(18, 20, 24, 0.92);
  color: #FFFFFF;
  border: 1px solid rgba(255, 107, 53, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 15px rgba(255, 107, 53, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 99998;
}

.scroll-3d-tooltip::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid rgba(255, 107, 53, 0.6);
}

.scroll-3d-widget-container:hover .scroll-3d-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Keyframe Animations */
@keyframes widget3DFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes widget3DPulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.85;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .scroll-3d-widget-container {
    bottom: 22px;
    left: 20px;
    width: 52px;
    height: 52px;
  }
  .scroll-3d-progress-ring {
    width: 58px;
    height: 58px;
    top: -3px;
    left: -3px;
  }
  .scroll-3d-progress-bar,
  .scroll-3d-progress-bg {
    r: 25;
    cx: 29;
    cy: 29;
    stroke-dasharray: 157;
  }
  .scroll-3d-arrow-box {
    font-size: 18px;
  }
  .scroll-3d-tooltip {
    display: none; /* Keep mobile clean */
  }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL SUCCESS MODAL CLOSE BUTTON FIX
   Ensures close icon is placed cleanly in the top-right corner
   and overrides any conflicting .btn-animated styles
   ═══════════════════════════════════════════════════════════ */
.modal-content {
  position: relative !important;
}

.modal-close-btn,
.modal-content .modal-close-btn,
.modal-header .modal-close-btn,
button#closeModal.modal-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #f1f3f5 !important;
  color: #495057 !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 20px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 99 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  transform: none !important;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.modal-close-btn:hover,
.modal-content .modal-close-btn:hover,
.modal-header .modal-close-btn:hover,
button#closeModal.modal-close-btn:hover {
  background: #e2e6ea !important;
  color: #111111 !important;
  transform: scale(1.08) !important;
  opacity: 1 !important;
}

.modal-close-btn .btn-text-wrapper,
button#closeModal .btn-text-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 1 !important;
}

.modal-close-btn .btn-text-item,
button#closeModal .btn-text-item {
  color: #495057 !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.modal-close-btn .btn-text-item:nth-child(n+2),
button#closeModal .btn-text-item:nth-child(n+2) {
  display: none !important;
}

.modal-close-btn::before,
.modal-close-btn::after,
button#closeModal::before,
button#closeModal::after {
  display: none !important;
}

