/**
 * Buttons Module
 */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 2rem; border: none; border-radius: var(--radius-md); font-size: 1rem; font-weight: 500; cursor: pointer; transition: var(--transition-normal); text-decoration: none; min-height: 48px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-3); transform: translateY(-1px); }

/* Target 95% button and preset */
.target-button { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(99, 102, 241, 0.92)); color: white; border: 1px solid rgba(59, 130, 246, 0.4); border-radius: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .35s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2), 0 1px 2px rgba(59, 130, 246, 0.3), 0 0 0 0 rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.2); -webkit-backdrop-filter: saturate(1.2) blur(6px); backdrop-filter: saturate(1.2) blur(6px); z-index: 5; overflow: hidden; animation: none; will-change: box-shadow, border-color; }
.target-button::before { content: '\f140'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 1rem; line-height: 1; z-index: 2; position: relative; }
.target-button::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.3); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; z-index: 1; }
.target-button:hover { background: linear-gradient(135deg, rgba(251, 146, 60, 0.98), rgba(245, 158, 11, 0.96)); color: white; border-color: rgba(251, 146, 60, 0.6); box-shadow: 0 4px 20px rgba(251, 146, 60, 0.45), 0 2px 8px rgba(251, 146, 60, 0.5), 0 0 0 3px rgba(251, 146, 60, 0.2), 0 0 20px rgba(251, 146, 60, 0.3), inset 0 1px 0 rgba(255,255,255,0.25); transform: translateY(-50%) scale(1.08); }
.target-button:active { transform: translateY(-50%) scale(0.95); transition: all .1s ease; }
.target-button:active::after { width: 40px; height: 40px; transition: width .2s, height .2s; }
.target-button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), 0 4px 16px rgba(59, 130, 246, 0.35), 0 2px 4px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
.target-button.optimizing { background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.92)); animation: optimizePulse 1.5s ease-in-out infinite, optimizeGlow 2s ease-in-out infinite alternate; }
@keyframes optimizePulse { 0%, 100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.1); } }
@keyframes optimizeGlow { 0% { box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3), 0 1px 2px rgba(245, 158, 11, 0.4); } 100% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5), 0 2px 8px rgba(245, 158, 11, 0.6), 0 0 0 4px rgba(245, 158, 11, 0.1); } }
.target-button.loading { animation: targetBtnSpin 0.8s linear infinite; }
@keyframes targetBtnSpin { to { transform: translateY(-50%) rotate(360deg); } }
/* Entfernt: Schwarzes Pseudo-Tooltip beim Hover auf 95%-Buttons */

.preset-button { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 0.6rem; border-radius: 8px; border: 1px solid rgba(148,163,184,0.35); background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.92)); color: var(--primary, #2563eb); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: box-shadow .2s ease, transform .12s ease, background-color .2s ease, color .2s ease, border-color .2s ease; box-shadow: 0 4px 12px rgba(17,24,39,0.08), inset 0 1px 0 rgba(255,255,255,0.6); -webkit-backdrop-filter: saturate(1.2) blur(6px); backdrop-filter: saturate(1.2) blur(6px); }
.preset-button-group { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); display: inline-flex; gap: .35rem; }
.preset-button-group .preset-button { position: relative; right: auto; top: auto; transform: none; height: 30px; }
.preset-button.is-active { background: linear-gradient(180deg, rgba(234,241,255,0.98), rgba(225,235,255,0.96)); color: var(--primary, #1d4ed8); border-color: rgba(37,99,235,0.5); box-shadow: 0 0 0 2px rgba(37,99,235,0.18) inset, 0 4px 12px rgba(17,24,39,0.06); }
.preset-button:hover { background: linear-gradient(180deg, rgba(245,249,255,0.98), rgba(234,241,255,0.96)); color: var(--primary, #2563eb); border-color: rgba(37,99,235,0.45); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18), 0 0 0 2px rgba(37,99,235,0.12); }

@media (max-width: 768px) {
  .btn {
    width: 100%;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    min-height: 50px;
  }

  .target-button {
    width: 32px;
    height: 32px;
    right: 0.75rem;
  }

  .preset-button-group {
    right: 0.75rem;
    gap: 0.4rem;
  }

  .preset-button,
  .preset-button-group .preset-button {
    height: 34px;
    padding-inline: 0.75rem;
    font-size: 0.85rem;
  }
}



