/* Botão original de salvar receita */
.receiteria-fav-button {
    display: block;
    width: 100%;
    background: #F7EFE4;
    color: #F53E28;
    border-radius: 30px;
    padding: 10px 0;
    text-align: center;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.4;
}

.receiteria-fav-button:hover {
    background: #F53E28;
    color: #fff;
    text-decoration: none;
}

.receiteria-fav-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 62, 40, 0.3);
}

.receiteria-fav-button.favorited {
    background: #F53E28;
    color: #fff;
}

.receiteria-fav-button.favorited:hover {
    background: #d73527;
    color: #fff;
}

.receiteria-fav-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* NOVO: Botão de coração */
.receiteria-heart-button {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0px !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.receiteria-heart-button:hover {
    background: rgba(231, 76, 60, 0.1) !important;
    transform: scale(1.1) !important;
}

.receiteria-heart-button:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3) !important;
}

.receiteria-heart-button.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.receiteria-heart-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

.receiteria-heart-button.loading i {
    opacity: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Container de toasts */
#receiteria-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

/* Toast individual */
.receiteria-toast {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
    max-width: 400px;
    min-width: 320px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    border-left: 4px solid #e74c3c;
}

.receiteria-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.toast-text {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 2px;
}

.toast-subtitle {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.toast-btn {
    background: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toast-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.toast-close {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* Responsividade do toast */
@media (max-width: 480px) {
    #receiteria-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .receiteria-toast {
        min-width: auto;
        max-width: none;
    }
    
    .toast-content {
        padding: 12px;
        gap: 10px;
    }
    
    .toast-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .toast-title {
        font-size: 13px;
    }
    
    .toast-subtitle {
        font-size: 11px;
    }
    
    .toast-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* Animação de entrada suave */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animação de saída suave */
@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Página de receitas favoritas - estilos existentes mantidos */
.receita-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.receita-card.removing {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
    transition: all 0.4s ease;
}

.receita-card.removed {
    display: none;
}

.counter-update {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Layout dos botões na página de favoritos */
.card-buttons {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
}

.ver-receita-btn, .remove-card-btn {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* CSS responsivo para página de favoritos */
@media (max-width: 1024px) {
    .receitas-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .receitas-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .card-image {
        height: 150px !important;
    }
    
    /* Mobile: botões empilhados */
    .card-buttons {
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    .ver-receita-btn, .remove-card-btn {
        width: 100% !important;
        flex: none !important;
    }
}

@media (max-width: 480px) {
    .receitas-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .card-content {
        padding: 12px !important;
    }
}

/* Animações de loading para botões */
.remove-card-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.remove-card-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 5px;
}

