/* Sistema de Botões Unificado - IA Fundo */

/* ===== BOTÕES BASE ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1;
    outline: none;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== VARIANTES PRINCIPAIS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--button-shadow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--button-shadow-hover);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--card-bg-hover);
    color: var(--text-color);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(138, 43, 226, 0.1);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(66, 184, 131, 0.25);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(66, 184, 131, 0.35);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.35);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    color: #212529;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.25);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.35);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0056b3);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.25);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 191, 255, 0.35);
    color: white;
}

/* ===== TAMANHOS ===== */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-xs);
    border-radius: 4px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    border-radius: 6px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
    border-radius: 10px;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: var(--font-size-xl);
    border-radius: 12px;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 100px;
}

/* ===== BOTÕES ESPECIAIS ===== */
.btn-upgrade {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-upgrade:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.4);
    color: white;
}

/* ===== BOTÕES DE PREÇO ===== */
.btn-price {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    text-decoration: none;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: none;
}

.btn-price.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 6px 15px rgba(138, 43, 226, 0.25);
}

.btn-price.primary:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
}

.btn-price.outline {
    border: 2px solid rgba(138, 43, 226, 0.4);
    color: var(--primary-light);
    background: transparent;
}

.btn-price.outline:hover:not(:disabled) {
    background: rgba(138, 43, 226, 0.08);
    transform: translateY(-5px);
    border: 2px solid rgba(138, 43, 226, 0.6);
    color: var(--primary-light);
}

.btn-price.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: rgba(138, 43, 226, 0.08);
    color: rgba(163, 82, 255, 0.6);
    border: 1px solid rgba(138, 43, 226, 0.2);
}

/* ===== BOTÃO TWITCH ===== */
.btn-twitch {
    background: var(--twitch-purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(145, 70, 255, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-twitch:hover:not(:disabled),
.btn-twitch:focus:not(:disabled) {
    background: var(--twitch-purple-dark);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 24px rgba(145, 70, 255, 0.22);
}

.btn-twitch i {
    font-size: 1.4rem;
    margin-right: 0.3rem;
    vertical-align: middle;
}

/* ===== BOTÃO KICK ===== */
.btn-kick {
    background: linear-gradient(135deg, #53fc18 0%, #45d613 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 16px rgba(83, 252, 24, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-kick:hover:not(:disabled),
.btn-kick:focus:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 24px rgba(83, 252, 24, 0.3);
    color: #000;
    text-decoration: none;
}

.btn-kick svg {
    flex-shrink: 0;
}

/* Kick outline button (for channel cards) */
.btn-outline-kick {
    border-color: #53fc18 !important;
    color: #53fc18 !important;
}

.btn-outline-kick:hover {
    background: rgba(83, 252, 24, 0.12) !important;
    color: #53fc18 !important;
}

.btn-outline-kick svg {
    vertical-align: middle;
    margin-right: 2px;
}

/* ===== BOTÕES ICON ===== */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-icon i {
    font-size: 1.1rem;
}

.btn-icon.sm {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.btn-icon.sm i {
    font-size: 1rem;
}

.btn-icon.lg {
    width: 52px;
    height: 52px;
    border-radius: 10px;
}

.btn-icon.lg i {
    font-size: 1.3rem;
}

/* ===== BOTÕES DE NAVEGAÇÃO ===== */
.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.3);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== BOTÕES DE AÇÃO EM LOTE ===== */
.batch-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.batch-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.batch-btn.danger {
    background: rgba(220, 53, 69, 0.8);
}

.batch-btn.danger:hover:not(:disabled) {
    background: var(--danger-color);
}

.batch-btn.success {
    background: rgba(66, 184, 131, 0.8);
}

.batch-btn.success:hover:not(:disabled) {
    background: var(--secondary-color);
}

/* ===== BOTÕES ESPECIALIZADOS ===== */
/* Botão de curtir */
.btn-like,
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-like:hover:not(:disabled),
.like-btn:hover:not(:disabled) {
    color: var(--primary-color);
    background: rgba(138, 43, 226, 0.1);
}

.btn-like.liked,
.like-btn.liked {
    color: #ff426b;
}

.btn-like.modern,
.like-btn.modern {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 10px 18px;
    color: #fff;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn-like.modern::before,
.like-btn.modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(255, 66, 107, 0), rgba(255, 66, 107, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-like.modern:hover:not(:disabled),
.like-btn.modern:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-like.modern:hover::before,
.like-btn.modern:hover::before {
    opacity: 1;
}

.btn-like.modern.liked,
.like-btn.modern.liked {
    background: rgba(255, 66, 107, 0.15);
    color: #ff426b;
}

.btn-like.modern.liked i,
.like-btn.modern.liked i {
    animation: heartbeat 0.8s ease-in-out;
    transform: scale(1.2);
    color: #ff426b;
}

/* Botão compacto */
.btn-like.compact-btn {
    padding: 0;
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-like.compact-btn i {
    font-size: 1rem;
    margin-right: 3px;
    opacity: 0.7;
}

.btn-like.compact-btn:hover:not(:disabled) {
    color: var(--primary-color);
}

.btn-like.compact-btn:hover:not(:disabled) i {
    opacity: 1;
}

.btn-like.compact-btn.liked {
    color: #ff4757;
}

.btn-like.compact-btn.liked i {
    opacity: 1;
}

/* Botão de copiar */
.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    border: none;
    border-radius: 0 6px 6px 0;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Botão de adicionar usuário */
.btn-add-user,
.btn-add-specific-user {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0 6px 6px 0;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add-user:hover:not(:disabled),
.btn-add-specific-user:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-add-specific-user {
    width: auto;
    padding: 0 1rem;
    border-radius: 6px;
}

.btn-add-specific-user i {
    margin-right: 0.3rem;
}

/* Botão de remover usuário */
.remove-user {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-user:hover:not(:disabled) {
    background: var(--danger-color);
    color: white;
}

/* Botões de assinatura */
.subscribe-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.subscribe-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== ESTADOS ESPECIAIS ===== */
.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn.has-pending-changes {
    animation: pulse 0.5s ease-in-out;
    box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.2);
}

/* ===== GRUPOS DE BOTÕES ===== */
.btn-group {
    display: inline-flex;
    align-items: center;
}

.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-group .btn:first-child {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    border-right: none;
}

.btn-group .btn:only-child {
    border-radius: var(--border-radius);
    border-right: none;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .btn-large,
    .btn-xl {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-price {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .btn-icon {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-upgrade {
        padding: 0.6rem 1.5rem;
    }
    
    .btn-twitch {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== TEMA CLARO ===== */
:root[data-theme="light"] .btn-secondary,
html.light-theme .btn-secondary,
body.light-theme .btn-secondary {
    background: #ffffff;
    border-color: var(--border-color);
}

:root[data-theme="light"] .btn-icon,
html.light-theme .btn-icon,
body.light-theme .btn-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ===== PRINT STYLES ===== */
@media print {
    .btn {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .btn,
    .btn-like,
    .like-btn,
    .nav-btn,
    .batch-btn {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ===== NAV AUTH BUTTONS ===== */
.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== KICK CONNECT BUTTON ===== */
.btn-kick-connect {
    background: linear-gradient(135deg, #53fc18, #45d414);
    color: #000 !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-kick-connect svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-kick-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(83, 252, 24, 0.35);
    background: linear-gradient(135deg, #5fff22, #53fc18);
    color: #000 !important;
}

@media (max-width: 768px) {
    .nav-auth-buttons {
        flex-direction: column;
        gap: 0.4rem;
        width: 100%;
    }
    .nav-auth-buttons .btn,
    .nav-auth-buttons .btn-kick-connect {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ===== CONNECT SELECTOR DROPDOWN ===== */
.connect-selector {
    position: relative;
    z-index: 1002;
    display: inline-flex;
}

.connect-selector .connect-btn {
    cursor: pointer;
    white-space: nowrap;
}

.connect-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    min-width: 220px;
    overflow: hidden;
    z-index: 9999;
}

.connect-dropdown-up {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(10px);
}

.connect-selector.open .connect-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.connect-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.2rem;
    color: var(--text-color, #e0e0e0);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.connect-option:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.connect-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.connect-option svg,
.connect-option i {
    flex-shrink: 0;
    color: inherit;
}

/* CTA connect selector - centered */
.cta-connect-selector {
    display: inline-flex;
    justify-content: center;
}

.cta-connect-selector .connect-dropdown {
    left: 50%;
    right: auto;
    transform: translate(-50%, 10px);
}

.cta-connect-selector.open .connect-dropdown {
    transform: translate(-50%, 0);
}

@media (max-width: 768px) {
    .connect-dropdown {
        min-width: 200px;
    }
}