/**
 * Support Banner & Ko-fi Button Styles
 * Design moderno e non invasivo
 */

/* Banner principale */
.support-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 9998;
  max-width: 380px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.support-banner--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.support-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.support-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  color: #2c3e50;
}

.support-text strong {
  font-size: 16px;
  color: #1a1a2e;
  display: block;
  margin-bottom: 4px;
}

.support-text span {
  font-size: 14px;
  color: #7f8c8d;
}

.kofi-link {
  display: block;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.kofi-link:hover {
  transform: scale(1.05);
}

.kofi-link img {
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Bottone chiusura */
.support-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #95a5a6;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.support-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #2c3e50;
}

.support-close:active {
  transform: scale(0.95);
}

/* Bottone flottante - discreto */
.kofi-floating-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #29abe0;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(41, 171, 224, 0.3);
  z-index: 9997;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}

.kofi-floating-btn--visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.kofi-floating-btn:hover {
  background: #1f8fb8;
  box-shadow: 0 6px 30px rgba(41, 171, 224, 0.4);
  transform: translateY(-2px);
}

.kofi-floating-btn:active {
  transform: translateY(0);
}

.kofi-floating-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* Variante con solo icona (mobile) */
@media (max-width: 640px) {
  .kofi-floating-btn span {
    display: none;
  }

  .kofi-floating-btn {
    padding: 12px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
  }

  .support-banner {
    bottom: 80px; /* Sopra il bottone flottante */
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .support-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .support-text {
    font-size: 14px;
  }
}

/* Animazioni pulsante */
@keyframes ko-fi-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(41, 171, 224, 0.3);
  }
  50% {
    box-shadow: 0 4px 30px rgba(41, 171, 224, 0.5);
  }
}

.kofi-floating-btn--pulse {
  animation: ko-fi-pulse 2s ease-in-out infinite;
}

/* Banner varianti alternative */
.support-banner--compact {
  padding: 16px 20px;
}

.support-banner--compact .support-text strong {
  font-size: 15px;
}

.support-banner--compact .support-text span {
  font-size: 13px;
}

/* Tema scuro (opzionale) */
@media (prefers-color-scheme: dark) {
  .support-banner {
    background: linear-gradient(135deg, #2a2a40 0%, #1e1e30 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
  }

  .support-text {
    color: rgba(255, 255, 255, 0.9);
  }

  .support-text strong {
    color: white;
  }

  .support-text span {
    color: rgba(255, 255, 255, 0.6);
  }

  .support-close {
    color: rgba(255, 255, 255, 0.6);
  }

  .support-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }
}

/* In-page support button (opzionale) */
.kofi-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #29abe0;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.kofi-inline-btn:hover {
  background: #1f8fb8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 171, 224, 0.3);
}

.kofi-inline-btn img {
  height: 20px;
  filter: brightness(0) invert(1);
}

/* Footer support section */
.footer-support {
  background: linear-gradient(135deg, #ff1744 0%, #f50057 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
  border-radius: 16px;
  margin-top: 60px;
}

.footer-support h3 {
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-support p {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.footer-support .kofi-link {
  display: inline-block;
  background: white;
  padding: 4px 8px;
  border-radius: 8px;
}

/* Accessibility */
.kofi-floating-btn:focus-visible,
.kofi-inline-btn:focus-visible,
.support-close:focus-visible {
  outline: 2px solid #29abe0;
  outline-offset: 2px;
}

/* Print - nascondi elementi di supporto */
@media print {
  .support-banner,
  .kofi-floating-btn,
  .footer-support {
    display: none !important;
  }
}
