/* ════════ CONTACT WIDGET ════════
   Floating expandable contact widget.
   Designed to be dropped onto any page on yuvalmedina.com.
   Self-contained; uses scoped class names to avoid conflicts.
   Inherits --gold and other CSS variables if defined; falls back otherwise. */

.contact-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  font-family: 'Manrope', system-ui, sans-serif;

  /* Hidden by default until scroll triggers visibility */
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.contact-widget--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ─── Button ─── */
.contact-widget__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: rgba(11, 15, 26, 0.92);
  color: #e8e4df;
  border: 1px solid var(--gold, #d4a55a);
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
}

.contact-widget__button:hover {
  background: var(--gold, #d4a55a);
  color: #06080e;
  transform: translateY(-1px);
}

.contact-widget__button:focus-visible {
  outline: 2px solid var(--gold, #d4a55a);
  outline-offset: 2px;
}

/* ─── Panel ─── */
.contact-widget__panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 280px;
  padding: 1.5rem;
  background: rgba(11, 15, 26, 0.96);
  border: 1px solid rgba(212, 165, 90, 0.3);
  border-radius: 4px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

  /* Hidden by default; shown when widget--open */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.contact-widget--open .contact-widget__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.contact-widget__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #e8e4df;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.contact-widget__intro {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.5;
  color: #9a958d;
  margin: 0 0 1.25rem;
}

.contact-widget__email {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  color: var(--gold, #d4a55a);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 165, 90, 0.2);
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  word-break: break-all;
  transition: color 0.3s ease;
}

.contact-widget__email:hover {
  color: #e0b46a;
}

.contact-widget__social {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a958d;
}

.contact-widget__social a {
  color: #9a958d;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-widget__social a:hover {
  color: var(--gold, #d4a55a);
}

.contact-widget__sep {
  color: var(--gold, #d4a55a);
  margin: 0 0.5em;
}

/* ─── Mobile ─── */
@media (max-width: 520px) {
  .contact-widget {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .contact-widget__button {
    width: 100%;
    padding: 0.9rem 1.5rem;
  }

  .contact-widget__panel {
    width: auto;
    left: 0;
    right: 0;
  }
}

/* ─── Reduce motion ─── */
@media (prefers-reduced-motion: reduce) {
  .contact-widget,
  .contact-widget__button,
  .contact-widget__panel {
    transition: opacity 0.2s ease;
  }

  .contact-widget__button:hover {
    transform: none;
  }
}
