/* Современные стили для кнопок */ /* Автор: Сергей Антропов - https://devops.org.ru */ :root { --btn-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%); --btn-primary-hover: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%); --btn-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --btn-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .btn { font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 0.5rem; border: none; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.9375rem; line-height: 1.5; text-decoration: none; box-shadow: var(--btn-shadow); position: relative; overflow: hidden; } .btn::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s; } .btn:hover::before { width: 300px; height: 300px; } .btn:hover { transform: translateY(-2px); box-shadow: var(--btn-shadow-hover); } .btn:active { transform: translateY(0); box-shadow: var(--btn-shadow); } .btn:focus { outline: none; box-shadow: var(--btn-shadow-hover), 0 0 0 0.2rem rgba(102, 126, 234, 0.25); } /* Primary button */ .btn-primary { background: var(--btn-primary); color: #fff; } .btn-primary:hover { background: var(--btn-primary-hover); color: #fff; } /* Success button */ .btn-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; } .btn-success:hover { background: linear-gradient(135deg, #059669 0%, #047857 100%); color: #fff; } /* Secondary button */ .btn-secondary { background: #6b7280; color: #fff; } .btn-secondary:hover { background: #4b5563; color: #fff; } /* Outline buttons */ .btn-outline-primary { background: transparent; border: 2px solid #667eea; color: #667eea; } .btn-outline-primary:hover { background: #667eea; color: #fff; } .btn-outline-secondary { background: transparent; border: 2px solid #6b7280; color: #6b7280; } .btn-outline-secondary:hover { background: #6b7280; color: #fff; } .btn-outline-light { background: transparent; border: 2px solid rgba(255, 255, 255, 0.5); color: #fff; } .btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; color: #fff; } .btn-outline-info { background: transparent; border: 2px solid #0dcaf0; color: #0dcaf0; } .btn-outline-info:hover { background: #0dcaf0; color: #fff; border-color: #0dcaf0; } .btn-outline-warning { background: transparent; border: 2px solid #ffc107; color: #ffc107; } .btn-outline-warning:hover { background: #ffc107; color: #000; border-color: #ffc107; } .btn-outline-success { background: transparent; border: 2px solid #10b981; color: #10b981; } .btn-outline-success:hover { background: #10b981; color: #fff; border-color: #10b981; } /* Светлосерый border для кнопок ZFS и LVM */ .btn-outline-success[hx-post*="/sync/storages"], .btn-outline-warning[hx-post*="/sync/lvm"] { border-color: #d3d3d3; } .btn-outline-success[hx-post*="/sync/storages"]:hover, .btn-outline-warning[hx-post*="/sync/lvm"]:hover { border-color: #d3d3d3; } /* Danger button */ .btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #fff; } .btn-danger:hover { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); color: #fff; } /* Small buttons */ .btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: 0.375rem; } /* Large buttons */ .btn-lg { padding: 1rem 2rem; font-size: 1.125rem; border-radius: 0.625rem; } /* Disabled state */ .btn:disabled, .btn.disabled { opacity: 0.6; cursor: not-allowed; transform: none; } .btn:disabled:hover, .btn.disabled:hover { transform: none; box-shadow: var(--btn-shadow); } /* Logout button */ .btn-logout { background: transparent; border: 2px solid rgba(255, 255, 255, 0.5); color: #fff; padding: 0.5rem 1rem; } .btn-logout:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; color: #fff; } /* Icon spacing in buttons */ .btn span { display: inline-block; transition: var(--transition); } .btn:hover span { transform: scale(1.1); } /* Button groups */ .btn-group { display: inline-flex; gap: 0.5rem; } /* Loading state */ .btn.loading { position: relative; color: transparent; pointer-events: none; } .btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; top: 50%; left: 50%; margin-left: -8px; margin-top: -8px; border: 2px solid currentColor; border-radius: 50%; border-top-color: transparent; animation: spin 0.6s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Responsive */ @media (max-width: 768px) { .btn { padding: 0.625rem 1.25rem; font-size: 0.875rem; } .btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; } }