.sticky-contact {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-contact.entry-hidden {
  transform: translateY(-50%) translateX(100%);
  opacity: 0;
}

.sticky-contact.minimized .sticky-contact-list {
  transform: translateX(calc(100% + 8px));
  opacity: 0;
  pointer-events: none;
}

.sticky-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

.sticky-contact-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sticky-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
  color: #fff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
  text-decoration: none;
  box-shadow: -2px 0 20px rgb(200 16 46 / 0.25);
}

.sticky-contact-item:first-child .sticky-contact-icon {
  border-radius: 0;
}

.sticky-contact-item:last-child .sticky-contact-icon {
  border-radius: 0 0 0 12px;
}

.sticky-contact-item:not(:last-child) .sticky-contact-icon::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: rgb(255 255 255 / 0.2);
}

.sticky-contact-icon:hover {
  width: 58px;
  background: linear-gradient(135deg, #e8384f 0%, #c8102e 100%);
  box-shadow: -4px 0 30px rgb(200 16 46 / 0.45);
}

.sticky-contact-icon svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.sticky-contact-icon:hover svg {
  transform: scale(1.15);
}

.sticky-contact-label {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 0.5rem 1rem;
  background: rgb(15 23 42 / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 0;
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.2);
}

.sticky-contact-label::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgb(15 23 42 / 0.92);
}

.sticky-contact-item:hover .sticky-contact-label {
  opacity: 1;
  visibility: visible;
  margin-right: 8px;
}

.sticky-contact-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 52px;
  background: linear-gradient(135deg, #8b0a1e 0%, #6e0819 100%);
  color: rgb(255 255 255 / 0.7);
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: absolute;
  top: 0;
  right: 52px;
  z-index: 3;
  font-size: 0;
}

.sticky-contact-toggle:hover {
  background: linear-gradient(135deg, #a00d24 0%, #8b0a1e 100%);
  color: #fff;
  width: 28px;
}

.sticky-contact-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-contact.minimized .sticky-contact-toggle {
  right: 0;
  background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
  border-radius: 8px 0 0 8px;
  color: #fff;
  height: 44px;
  width: 28px;
}

.sticky-contact.minimized .sticky-contact-toggle svg {
  transform: rotate(180deg);
}

.sticky-contact-form-panel {
  position: fixed;
  right: -420px;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  max-height: 90vh;
  background: rgb(255 255 255 / 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px 0 0 20px;
  box-shadow:
    -8px 0 40px rgb(0 0 0 / 0.12),
    0 0 0 1px rgb(0 0 0 / 0.05);
  z-index: 10000;
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.sticky-contact-form-panel.active {
  right: 0;
}

.sticky-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.sticky-form-header h3 {
  margin: 0;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.sticky-form-header p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.85;
  font-weight: 400;
}

.sticky-form-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgb(255 255 255 / 0.15);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sticky-form-close:hover {
  background: rgb(255 255 255 / 0.3);
  transform: rotate(90deg);
}

.sticky-form-close svg {
  width: 18px;
  height: 18px;
}

.sticky-form-body {
  padding: 1.75rem;
}

.sticky-form-body .form-group {
  margin-bottom: 1.25rem;
}

.sticky-form-body label {
  display: block;
  margin-bottom: 0.375rem;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.sticky-form-body label .required {
  color: #c8102e;
  margin-left: 2px;
}

.sticky-form-body input,
.sticky-form-body textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 0.9375rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.25s ease;
  outline: none;
  box-sizing: border-box;
}

.sticky-form-body input:focus,
.sticky-form-body textarea:focus {
  border-color: #c8102e;
  background: #fff;
  box-shadow: 0 0 0 3px rgb(200 16 46 / 0.1);
}

.sticky-form-body input::placeholder,
.sticky-form-body textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.sticky-form-body textarea {
  min-height: 100px;
  resize: vertical;
}

.sticky-form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #c8102e 0%, #a00d24 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgb(200 16 46 / 0.35);
  margin-top: 0.5rem;
}

.sticky-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgb(200 16 46 / 0.45);
}

.sticky-form-submit:active {
  transform: translateY(0);
}

.sticky-form-submit svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.sticky-form-submit:hover svg {
  transform: translateX(3px);
}

.sticky-form-success {
  display: none;
  text-align: center;
  padding: 2rem 1.75rem;
}

.sticky-form-success.show {
  display: block;
  animation: stickyFadeIn 0.5s ease forwards;
}

.sticky-form-success-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg,
      rgb(16 185 129 / 0.1),
      rgb(16 185 129 / 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.sticky-form-success-icon svg {
  width: 32px;
  height: 32px;
  color: #10b981;
}

.sticky-form-success h4 {
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.sticky-form-success p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
}

.sticky-contact-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(15 23 42 / 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.sticky-contact-overlay.active {
  opacity: 1;
  visibility: visible;
}

@keyframes stickyFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stickyPulse {

  0%,
  100% {
    box-shadow: -2px 0 20px rgb(200 16 46 / 0.25);
  }

  50% {
    box-shadow: -2px 0 30px rgb(200 16 46 / 0.45);
  }
}

.sticky-contact.pulse .sticky-contact-icon {
  animation: stickyPulse 2s ease 1;
}

@media (max-width: 768px) {
  .sticky-contact-icon {
    width: 46px;
    height: 46px;
  }

  .sticky-contact-icon svg {
    width: 20px;
    height: 20px;
  }

  .sticky-contact-icon:hover {
    width: 48px;
  }

  .sticky-contact-toggle {
    width: 22px;
    height: 46px;
    right: 46px;
  }

  .sticky-contact.minimized .sticky-contact-toggle {
    right: 0;
    height: 40px;
    width: 26px;
  }

  .sticky-contact-label {
    display: none;
  }

  .sticky-contact-form-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    right: auto;
    left: 0;
    top: auto;
    bottom: -100%;
    transform: none;
    max-height: 85vh;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sticky-contact-form-panel.active {
    right: auto;
    bottom: 0;
  }

  .sticky-contact-form-panel .sticky-form-header {
    border-radius: 20px 20px 0 0;
    padding-top: 0.5rem;
    flex-direction: column;
    text-align: center;
  }

  .sticky-contact-form-panel .sticky-form-header::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: rgb(255 255 255 / 0.35);
    border-radius: 2px;
    margin: 0 auto 0.75rem;
  }

  .sticky-contact-form-panel .sticky-form-close {
    position: absolute;
    right: 1rem;
    top: 0.75rem;
  }
}

@media (max-width: 480px) {
  .sticky-contact-icon {
    width: 42px;
    height: 42px;
  }

  .sticky-contact-icon svg {
    width: 18px;
    height: 18px;
  }

  .sticky-contact-toggle {
    width: 20px;
    height: 42px;
    right: 42px;
  }

  .sticky-contact.minimized .sticky-contact-toggle {
    right: 0;
    height: 36px;
    width: 24px;
  }
}

@media print {

  .sticky-contact,
  .sticky-contact-form-panel,
  .sticky-contact-overlay {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  .sticky-contact,
  .sticky-contact-icon,
  .sticky-contact-label,
  .sticky-contact-form-panel,
  .sticky-contact-toggle,
  .sticky-contact-overlay {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Increase touch targets to pass Lighthouse mobile audits */
.sticky-contact-icon::before,
.sticky-contact-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 48px;
  min-height: 48px;
  transform: translate(-50%, -50%);
  z-index: 1;
}
