/* === Floating Contact Widget === */

.cw-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #d61f26;
  color: #fff;
  border: none;
  box-shadow: 0 14px 32px rgba(214, 31, 38, 0.45), 0 4px 10px rgba(0,0,0,0.12);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  font-family: inherit;
  padding: 0;
}
.cw-fab:hover { transform: translateY(-2px); background: #a31319; box-shadow: 0 18px 40px rgba(214, 31, 38, 0.55); }
.cw-fab svg { width: 28px; height: 28px; }
.cw-fab.is-open { background: #131313; transform: rotate(90deg); }
.cw-fab.is-open:hover { background: #2b2f36; }

/* Pulse ring on first load */
.cw-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #d61f26;
  z-index: -1;
  animation: cwPulse 2s ease-in-out 3;
  opacity: 0;
}
@keyframes cwPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Backdrop */
.cw-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 13, 0.45);
  z-index: 9996;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cw-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Panel */
.cw-panel {
  position: fixed;
  bottom: 100px;
  right: 22px;
  width: 320px;
  max-width: calc(100vw - 44px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  z-index: 9997;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;
}
.cw-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cw-header {
  background: #131313;
  color: #fff;
  padding: 18px 20px;
  position: relative;
}
.cw-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}
.cw-subtitle {
  font-size: 0.85rem;
  margin: 4px 0 0;
  color: rgba(255,255,255,0.78);
}

.cw-options {
  padding: 8px;
}

.cw-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #131313;
  transition: background 0.15s ease;
  cursor: pointer;
}
.cw-option:hover { background: #f5f6f8; text-decoration: none; }
.cw-option:not(:last-child) { border-bottom: 1px solid #f0f1f4; }

.cw-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(214, 31, 38, 0.10);
  color: #d61f26;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.cw-option-body { flex: 1; min-width: 0; }
.cw-option-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #131313;
  margin-bottom: 2px;
}
.cw-option-sub {
  font-size: 0.82rem;
  color: #667085;
  margin: 0;
}
.cw-option-arrow {
  color: #c7c7cc;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}
.cw-option:hover .cw-option-arrow { transform: translateX(2px); color: #d61f26; }

/* Featured AI Designer option */
.cw-option-featured {
  background: linear-gradient(135deg, #d61f26 0%, #a31319 100%);
  margin: 8px;
  border-radius: 12px;
  color: #fff;
}
.cw-option-featured:hover { background: linear-gradient(135deg, #a31319 0%, #7a0e12 100%); }
.cw-option-featured .cw-icon { background: rgba(255,255,255,0.2); color: #fff; }
.cw-option-featured .cw-option-title,
.cw-option-featured .cw-option-sub { color: #fff; }
.cw-option-featured .cw-option-sub { color: rgba(255,255,255,0.85); }
.cw-option-featured .cw-option-arrow { color: rgba(255,255,255,0.6); }

/* Footer with hours/availability */
.cw-footer {
  padding: 12px 20px 16px;
  background: #f5f6f8;
  font-size: 0.78rem;
  color: #667085;
  text-align: center;
  border-top: 1px solid #f0f1f4;
}
.cw-footer strong { color: #131313; }
.cw-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f766e;
  margin-right: 6px;
  vertical-align: 1px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .cw-fab { bottom: 16px; right: 16px; width: 56px; height: 56px; }
  .cw-panel { bottom: 84px; right: 16px; width: calc(100vw - 32px); }
  .cw-fab svg { width: 26px; height: 26px; }
}

/* Hide on print */
@media print {
  .cw-fab, .cw-panel, .cw-backdrop { display: none !important; }
}
