/* static/components/buttons.css */

/* --- BOTÕES CAJU GO v1.1 --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px; /* Um pouco mais de área de toque */
    border-radius: var(--radius-md); /* 12px - Mais arredondado */
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1;
    gap: 8px; /* Espaço entre ícone e texto */
}

.btn:active {
    transform: scale(0.96);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* 1. Botão Primário (Ação Principal - Laranja) */
.btn-primary {
    background-color: var(--caju-orange);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 140, 66, 0.25); /* Glow laranja suave */
}

.btn-primary:hover:not(:disabled) {
    background-color: #ff7b29; /* Laranja um pouco mais intenso */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 140, 66, 0.35);
}

/* 2. Botão Secundário (Borda e Texto Verde) */
.btn-secondary {
    background-color: #fff;
    border-color: var(--border-subtle);
    color: var(--verde-floresta);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--surface-hover);
    border-color: var(--verde-floresta);
    transform: translateY(-1px);
}

/* 3. Botão Fantasma (Sem borda, para ações terciárias) */
.btn-ghost {
    background-color: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
    background-color: rgba(26, 77, 46, 0.05); /* Verde muito clarinho */
    color: var(--verde-floresta);
}

/* 4. Botão de Perigo (Vermelho Delivery) */
.btn-danger {
    background-color: var(--vermelho-delivery);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #cc1925;
    box-shadow: 0 4px 10px rgba(234, 29, 44, 0.2);
}

/* 5. Botão Circular (Controles + e -) */
.btn-circle {
    width: 36px; /* Aumentei um pouco para facilitar o toque */
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--verde-floresta);
    font-size: 18px;
    font-weight: 800; /* Extra bold para os símbolos */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-circle:hover:not(:disabled) {
    border-color: var(--caju-orange);
    color: var(--caju-orange);
    transform: scale(1.1);
    background-color: #fff8f5; /* Laranja ultra claro */
}

.btn-circle:active {
    transform: scale(0.9);
}

/* Variação Pequena (sm) */
.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

/* Variação Grande (lg) - Ex: Finalizar Pedido */
.btn-lg {
    padding: 16px 24px;
    font-size: 16px;
    width: 100%; /* Geralmente ocupa tudo no mobile */
}

.checkout-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px; /* Não deixa ficar gigante em desktop */
    
    background-color: var(--verde-floresta); /* Fundo sólido da marca */
    color: #fff;
    
    border-radius: 50px; /* Formato de pílula bem moderno */
    padding: 8px 8px 8px 24px; /* Padding menor na direita p/ o botão encostar */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    box-shadow: var(--shadow-lg); /* Sombra alta para destacar do conteúdo */
    z-index: 1000;
    
    /* Animação suave ao aparecer */
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Lado Esquerdo (Texto) */
.bar-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

#checkout-bar-total {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

#checkout-bar-count {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8); /* Branco com transparência suave */
    font-weight: 600;
}

/* Botão de Ação (Ver Sacola) */
.checkout-btn {
    background-color: var(--caju-orange);
    color: #fff;
    border: none;
    
    /* Tamanho e Forma */
    height: 44px;
    padding: 0 24px;
    border-radius: 40px; /* Pílula interna */
    
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s, background-color 0.2s;
}

.checkout-btn:hover {
    background-color: #ff7b29;
    transform: scale(1.05);
}

.checkout-btn:active {
    transform: scale(0.95);
}

/* Estado Oculto (usado via JS quando sacola vazia) */
.checkout-bar[style*="display: none"] {
    animation: none;
    pointer-events: none;
}

@keyframes slideUp {
    from { 
        transform: translate(-50%, 100%); 
        opacity: 0; 
    }
    to { 
        transform: translate(-50%, 0); 
        opacity: 1; 
    }
}

/* Ajuste Mobile: Se a tela for muito pequena, cola embaixo */
@media (max-width: 360px) {
    .checkout-bar {
        bottom: 16px;
        width: 94%;
        padding-left: 20px;
    }
}