:root {
  --brand-dark: #0b8f83;
  --brand-mint: #caf7e4;
  --brand-cream: #fbf1e7;
  --brand-gold: #f59e0b;
  --btn-size: 84px;
}

/* دکمه شناور */
#floating-construction-widget {
  position: fixed;
  bottom: 75px;
  right: 25px;
  width: var(--btn-size);
  height: var(--btn-size);
  z-index: 999998;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.2s ease;
}

#floating-construction-widget:active {
  transform: scale(0.94);
}

/* حلقه نئونی متحرک */
.neon-spinner-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    var(--brand-mint) 90deg,
    var(--brand-gold) 180deg,
    var(--brand-mint) 270deg,
    transparent 360deg
  );
  animation: rotateRing 3.5s linear infinite;
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(202, 247, 228, 0.6));
  pointer-events: none;
}

@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* دایره اصلی دکمه */
.widget-btn-inner {
  position: absolute;
  inset: 3px;
  background: radial-gradient(circle at 35% 30%, #17a99c 0%, var(--brand-dark) 80%);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 10px 22px rgba(11, 143, 131, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.tools-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* آیکون‌ها و انیمیشن‌ها */
.tool-helmet {
  width: 36px;
  height: 36px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  z-index: 3;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
  animation: pulseHelmet 2.5s ease-in-out infinite alternate;
}

@keyframes pulseHelmet {
  0% { transform: translate(-50%, -46%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.06); }
}

.tool-shovel {
  width: 34px;
  height: 34px;
  position: absolute;
  top: 14px;
  left: 6px;
  transform: rotate(-35deg);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  animation: shovelWork 2.2s ease-in-out infinite;
}

@keyframes shovelWork {
  0%, 100% { transform: rotate(-35deg) translate(0, 0); }
  50% { transform: rotate(-42deg) translate(-2px, 1px); }
}

.tool-drill {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 10px;
  right: 7px;
  transform: rotate(15deg);
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  animation: drillVibrate 1.4s ease-in-out infinite;
}

@keyframes drillVibrate {
  0%, 100% { transform: rotate(15deg) scale(1); }
  40% { transform: rotate(18deg) scale(1.05); }
  50%, 65%, 80% { transform: rotate(14deg) translate(1px, -1px); }
  58%, 72% { transform: rotate(16deg) translate(-1px, 1px); }
}

/* بج اعلان قرمز */
.widget-badge {
  position: absolute;
  bottom: -1px;
  left: -1px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  pointer-events: none;
  animation: pulseBadge 1.5s infinite;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.widget-badge.badge-hidden {
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ======================================= */
/* استایل پاپ‌آپ (Modal) */
/* ======================================= */
#construction-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(11, 143, 131, 0.5) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 2147483647 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  direction: rtl !important;
  box-sizing: border-box !important;
  font-family: inherit, Tahoma, sans-serif !important;
}

.construction-modal-card {
  background: #ffffff !important;
  border: 2px solid var(--brand-mint) !important;
  border-radius: 24px !important;
  padding: 28px 24px !important;
  width: 90% !important;
  max-width: 380px !important;
  box-shadow: 0 25px 50px -12px rgba(11, 143, 131, 0.35) !important;
  text-align: center !important;
  position: relative !important;
  box-sizing: border-box !important;
  animation: popInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popInModal {
  from { transform: scale(0.75); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-btn-close {
  position: absolute !important;
  top: 15px !important;
  left: 15px !important;
  background: #f1f5f9 !important;
  border: none !important;
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  cursor: pointer !important;
  font-size: 16px !important;
  font-weight: bold !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  padding: 0 !important;
  transition: background 0.2s;
}

.modal-btn-close:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

.modal-icon-badge {
  width: 60px;
  height: 60px;
  background: var(--brand-mint);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-title {
  color: var(--brand-dark) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  margin: 0 0 10px !important;
}

.modal-desc {
  color: #475569 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin: 0 0 20px !important;
}

.modal-cta-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, var(--brand-dark), #0a736a) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 13px 0 !important;
  border-radius: 14px !important;
  font-weight: bold !important;
  font-size: 15px !important;
  box-shadow: 0 6px 18px rgba(11, 143, 131, 0.35) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(11, 143, 131, 0.5) !important;
  color: #ffffff !important;
}
